Information transmission method and encoding/decoding apparatus and encoding-multiplexing/decoding-demultiplexing apparatus in information transmission system to which information transmission method is applied

ABSTRACT

In an information transmission method, error robustness is provided for the bit stream itself so that decoding processing can be properly performed even in the event of an error in important information such as header information. A bit stream reconstruction circuit ( 107 ) in an encoding apparatus adds sync signals to the heads of encoded data streams, which are encoded by an encoder ( 103 ), in certain bit stream units, and then inserts designation information in each bit stream by using a designation information insertion circuit ( 106 ). Each designation information indicates the addition of information for reconstructing important header information. By inserting the designation information in the bit stream obtained, reconstruction information can be added to the bit stream. Even if, therefore, an error is introduced into the header information, and the information cannot be used for decoding processing, the decoding processing can be properly continued by using the new reconstruction information designated by the designation information as a substitute.

TECHNICAL FIELD

The present invention relates to a data transmission method oftransmitting an encoded video picture/still picture by using a wirecommunication network such as an ISDN or Internet or a radiocommunication network such as a PHS network or a satellite communicationnetwork and an encoding/decoding apparatus in a data transmission systemto which the method is applied.

BACKGROUND ART

With the recent advances in the techniques of performing digitalencoding of various types of information such as picture information andthe broadband network techniques, applications using these techniqueshave been increasingly developed, and systems for transmittingcompress-encoded pictures and the like by using communication networkshave been developed.

For example, a videophone, a teleconference system, and a digitaltelevision broadcast use a technique of compress-encoding videoinformation and speech information to small information amounts,multiplexing the compressed video code stream, the compressed voice codestream, and other data code streams into one code stream, andtransmitting/storing it.

As video signal compress-encoding techniques, motion compensation,discrete cosine transform (DCT), sub-band encoding, pyramid encoding,variable word-length encoding, and the like and schemes combining thesetechniques have been developed. The national standard schemes for videoencoding include ISO MPEG1, MPEG2, ITU-T H.261, H.262, and H.263. Thenational standard schemes for multiplexing code streams obtained bycompressing video signals and speech/audio signals and other datainclude the ISO MPEG system, ITU-TH.221 and H.223.

In a conventional video encoding scheme such as one of the above videoencoding national standard schemes, a video signal is segmented intoframes, and each frame is further segmented into small regions, thusencoding the signal in units of GOBs, macroblocks, or the like. Headerinformation indicating the encoding mode and the like is added to eachframe, GOB, and macroblock. These pieces of header information arealways required to decode the overall GOBs and the like. If, therefore,a transmission path/storage medium error is introduced into headerinformation to cause a decoding failure in a video decoder, the overallframe, GOB, or the like to which the header information is added cannotbe properly decoded. As a result, the quality of the reconstructedpicture in the video decoder greatly deteriorates.

When compress-encoded picture data is to be transmitted by using acommunication network, the reception side must decode the data toreconstruct significant information from the transmitted bit stream of“0”s and “1”s. For this purpose, the above header information plays avery important role as information indicating a specific rule underwhich a predetermined block of bit streams is encoded. Such headerinformation contains, for example, information indicating the predictiontype of the currently encoded frame (intraframe encoding, interframeencoding, or the like), information indicating the display timing (timereference) of the frame, step size information required forquantization, and the like. If these pieces of header information arelost, information transmitted afterward cannot be properly decoded.

Assume that an error is introduced into a bit stream owing to some causeto change information indicating the prediction type of a frame frominterframe encoding to intraframe encoding. In this case, even if actualinformation is properly transmitted afterward, since it is determined onthe decoding side that the signal is obtained as a result of intraframeencoding, the signal is not properly decoded in the end. The quality ofthe reconstructed picture in the video decoder therefore greatlydeteriorates.

Systems using wire communication networks have been prevalent to date.Even systems using radio communication systems have been built on theassumption that they use satellite communication with very low errorrates. Sufficient consideration has not therefore been given to errorrobustness of the structure of a code stream to be transmitted, andsatisfactory protection has not been given against transmission patherrors in important information such as header information.

In a PHS system which is part of the mainstream of mobile communication,the error rate is about hundred thousand or one million times that insatellite communication. For this reason, sufficient correction cannotbe performed by only error correction with respect to bit streamsencoded by a conventional technique. In an Internet system which isexpected to become part of the mainstream of communication like a PHSsystem, the types of errors that are likely to occur in data have notbeen statistically clarified, and hence proper error correction cannotbe performed in some case. Furthermore, in the PHS and Internet systems,part of information in a code stream may be lost. Theoretically, errorcorrection cannot cope with such a case. For this reason, the structureof a code stream itself needs to have error robustness.

As described above, satisfactory consideration has not been given toerror robustness of the structure of a code stream to be transmitted.Satisfactory consideration about transmission path errors has not beengiven to important information such as header information, inparticular, whose picture quality greatly deteriorates when atransmission path error is introduced therein.

It is an object of the present invention to provide an informationtransmission method capable of decoding a picture signal with highquality, even if a transmission path error is introduced into importantinformation such as header information, by providing error robustnessfor the structure of a code stream itself, and an encoding/decodingapparatus in an information transmission system to which the method isapplied.

DISCLOSURE OF INVENTION

According to the present invention, there is provided an informationtransmission method comprising causing a transmission side to transmitreconstruction information required to reconstruct contents of headerinformation or part of the header information upon adding thereconstruction information to encoded information, causing a receptionside to perform an error check with respect to the header information orpart of the header information, and decoding the encoded information byusing the reconstruction information as a substitute when an error isdetected by the error check.

According to the present invention, there is provided an informationtransmission method of transmitting reconstructing information forreconstructing the contents of header information required toreconstruct encoded information or the contents of part of theinformation after adding the reconstruction information to a datastream, and decoding the data stream by using the reconstructioninformation as a substitute when an error is detected in the headerinformation or part of the information on a reception side.

According to this information transmission method, even if an error isintroduced into header information, and the header information cannot beused for decoding processing, the decoding processing can be properlycontinued by using information designated by designation information asa substitute. As reconstruction information, header information or partof the header information may be used, the difference informationbetween previously transmitted header information or part thereof andimportant information to be currently transmitted, or the like may beused.

In addition, according to the present invention, in an informationtransmission system for segmenting information into two or more layers(e.g., a picture layer, a GOB layer, a macroblock layer, and a blocklayer), and transmitting a sync signal and header information requiredfor decoding upon adding the sync signal and the header information toeach layer, there are provided an encoding apparatus comprising meansfor inserting designation information having a predetermined pattern inthe header information, and means capable of transmitting informationwhich has already been transmitted from an upper layer or part of theinformation, information which has already been transmitted within thesame layer or part of the information, or information capable ofreconstructing the contents (the contents of a picture, e.g., a humanfigure or face) of information which has already been transmitted fromthe upper layer or within the same layer or the contents of part of theinformation, and a decoding apparatus corresponding to the encodingapparatus.

According to the present invention, in an information transmissionsystem for transmitting a sync signal and header information requiredfor decoding upon adding the sync signal and the information, there areprovided an information transmission system encoding apparatuscomprising an insertion section for inserting designation informationhaving a predetermined pattern in the header information, and atransmission section capable of transmitting information which hasalready been transmitted or part of the information or informationcapable of reconstructing contents of the information or part of theinformation, and a decoding apparatus corresponding to the encodingapparatus.

According to the present invention, in an information transmissionsystem for transmitting a sync signal and header information requiredfor decoding upon adding the sync signal and the information, there areprovided an encoding apparatus comprising an insertion section forinserting designation information having a predetermined pattern in theheader information, and a transmission section capable of transmittinginformation for changing encoding processing of a portion associatedwith the header information from encoding processing of a portion beforethe portion associated with the header information, wherein errorrobustness is provided for a code stream itself to allow proper decodingprocessing even if an error occurs in the header information, and adecoding apparatus corresponding to the encoding apparatus.

In the above apparatus, as reconstruction information, transmission ofwhich is indicated by designation information, information required fordecoding processing on all the layers is preferably used. In addition,the reconstruction information, transmission of which is indicated bythe designation information and information decoded in another sectionmay be combined into information which is required for decodingprocessing on all the layers. Furthermore, as the bit pattern ofdesignation information, a pattern, of the bit patterns defined asheader information other than the designation information, which is notused can be used. Moreover, in transmitting picture information,information that can be transmitted owing to designation information ispreferably information indicating the display timing of a frame,information indicating the prediction type of the frame, quantizationstep size information, or information indicating the time of the pictureframe.

According to the present invention, in an encoding apparatus comprisingone or more picture encoders for receiving and compress-encoding apicture signal, and a multiplexer for multiplexing a picture code streamoutput from each of the picture encoders and other data information codestreams, and outputting a multiplexing code stream containing amultiplexed header and a multiplexed payload, there is provided aninformation transmission apparatus comprising an insertion section forinserting header information in the picture code stream or part thereofin the multiplexed header, and a transmission section for adding anerror correction/detection code generated from information in themultiplexed header to the multiplexed header, providing error protectionfor the header information in the picture code stream together withother information associated with multiplexing in the multiplexed headerby using an error correction/detection code, and transmitting the headerinformation and other information.

In this encoding apparatus, strong error protection using errorcorrection/detection codes is provided for header information, in apicture code stream, which causes a great deterioration in the qualityof the decoded picture upon introduction of an error, together with amultiplexed header. Even if, therefore, a compressed picture istransmitted through a corrupted transmission path/storage medium, highreconstructed picture quality can be obtained.

The header information in the picture code stream which is contained inthe multiplexed header may be information indicating the time of thepicture frame. With this information, even if the information indicatingthe time of the picture frame, which is contained in the headerinformation in the picture code stream, is lost, the time information ofthe picture frame can be decoded from the multiplexed header. Therefore,the decoded picture can be displayed/reconstructed at a proper time, andthe correct boundaries between the picture frames in the picture codestream can be detected.

In addition, according to the present invention, there is provided anencoding/multiplexing apparatus comprising a segmentation section forsegmenting a plurality of types of compressed code strings obtained bycompress-encoding an input signal in encoding units, a firstmultiplexing section for generating multiplexed unit code strings byadding stuffing bits to the segmented compressed code strings insegmenting units, and a second multiplexing section for generating amultiplexing code stream by multiplexing the multiplexed unit codestrings, the multiplexed unit code string having a length correspondingto an integer multiple of a predetermined length.

Since multiplexed unit code strings each having a length correspondingto an integer multiple of the predetermined length by adding stuffingbits in segmenting units are generated in this manner, the introductionof an error can be easily detected on the decoding/demultiplexingapparatus side by comparing the end position of a compressed code stringin each multiplexed unit code string with the start position of stuffingbits. In addition, since a pseudo-sync code is not easily generated evenif an error is introduced, high error robustness can be attained.

Furthermore, an encoding/multiplexing apparatus of the present inventionincludes a compress-encoder for generating compressed code strings byencoding an input signal so as to segment the signal into certainencoding units, and a multiplexing section for generating a multiplexingcode stream by collecting sync words having the same degree ofimportance from the segmented compressed code strings. Codes indicatingdelimiters between the encoding units are inserted in the multiplexingcode stream obtained in accordance with the respective degrees ofimportance. With this processing, error protection can be given inaccordance with the degree of importance of each code word, and hencethe quality of the decoded image improves in the event of a transmissionpath error.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram showing the arrangement of an encodingapparatus used in an information transmission system according to thefirst embodiment of the present invention;

FIG. 2 is a block diagram showing the arrangement of a decodingapparatus used in the information transmission system according to thefirst embodiment;

FIGS. 3A and 3B are views showing how a frame is segmented into aplurality of layers in the information transmission system according tothe first embodiment;

FIGS. 4A to 4C are views showing bit streams on the respective layers inFIGS. 3A and 3B;

FIGS. 5A to 5E are views showing the formats of bit streams replacingthose in FIGS. 4A to 4C;

FIGS. 6A and 6B are views showing a case in which a frame has a singlelayer in the information transmission system according to the firstembodiment;

FIG. 7 is a block diagram showing another arrangement of the encodingapparatus used in the information transmission system according to thepresent invention;

FIG. 8 is a block diagram showing the arrangement of a decodingapparatus corresponding to the encoding apparatus in FIG. 7;

FIGS. 9A and 9B are views showing the internal state of a frame in acase in which a refresh operation is performed in the informationtransmission system according to the first embodiment and acorresponding bit stream;

FIGS. 10A and 10B are views showing other examples associated with thecontents of important information to be transmitted by the informationtransmission system according to the first embodiment;

FIG. 11 is a block diagram showing the arrangement of a decodingprocessing circuit corresponding to FIGS. 10A and 10B;

FIG. 12 is a view showing a case in which designation information usedin the first embodiment is part of another header information table;

FIG. 13 is a view for explaining the regions to be encoded in a framewhich are used in an information transmission system according to thesecond embodiment of the present invention;

FIGS. 14A to 14D are views showing examples of the picture code streamsused in the second embodiment;

FIG. 15 is a view for explaining time pieces of information contained inthe picture code streams in FIGS. 14A to 14D;

FIG. 16 is a block diagram showing the arrangement of a decodingapparatus used in the second embodiment;

FIGS. 17A to 17C are views showing examples of the VOP header and thevideo packet header used in the second embodiment;

FIG. 18 is a block diagram showing another arrangement of the decodingapparatus used in the second embodiment;

FIG. 19 is a block diagram showing the overall arrangement of apicture/speech encoding apparatus used in an information transmissionsystem according to the third embodiment of the present invention;

FIG. 20 is a block diagram showing the overall arrangement of apicture/speech decoding apparatus used in the third embodiment;

FIGS. 21A and 21B are views showing an example of the video code streamused in the third embodiment;

FIG. 22 is a view showing an example of the multiplexing code streamused in the third embodiment;

FIGS. 23A and 23B are views showing the first example of the multiplexedheader used in the third embodiment;

FIGS. 24A and 24B are views showing the second example of themultiplexed header used in the third embodiment;

FIG. 25 is a view showing the second example of the multiplexing codestream used in the third embodiment;

FIG. 26 is a view showing the third example of the multiplexing codestream used in the third embodiment;

FIGS. 27A and 27B are views showing the third example of the videopacket header used in the present invention;

FIGS. 28A and 28B are views showing the fourth example of the videopacket header used in the present invention;

FIG. 29 is a block diagram showing a medium on which information basedon the present invention is recorded and a decoding apparatus for themedium;

FIG. 30 is a flow chart showing a procedure for decoding the informationrecorded on the medium in FIG. 29;

FIGS. 31A to 31D are views showing a case in which bits are added to acode stream to prevent a pseudosync code in the present invention;

FIGS. 32A to 32C are views for explaining marker bits used for a codestream in the present invention;

FIG. 33 is a view showing an example of the bit stream using a slicelayer in the present invention;

FIGS. 34A to 34C are views each showing an example of the video codestream used in the fourth embodiment of the present invention;

FIGS. 35A and 35B are views showing a method of setting sync codes andstuffing bits in the fourth embodiment;

FIG. 36 is a block diagram showing the arrangement of a multiplexer inthe fourth embodiment;

FIG. 37 is a view showing an example of the output from an adaptationlayer in the fourth embodiment;

FIGS. 38A to 38C are views each showing an example of the output from amultiplex layer in the fourth embodiment;

FIGS. 39A to 39C are views each showing the first example of how a videocode stream is segmented on the adaptation layer in the fourthembodiment;

FIGS. 40A to 40C are views each showing the second example of how avideo code stream is segmented on the adaptation layer in the fourthembodiment;

FIGS. 41A and 41B are views each showing the third example of how avideo code stream is segmented on the adaptation layer in the fourthembodiment;

FIGS. 42A to 42C are views each showing the fourth example of how avideo code stream is segmented on the adaptation layer in the fourthembodiment;

FIGS. 43A to 43C are views each showing the fifth example of how a videocode stream is segmented on the adaptation layer in the fourthembodiment;

FIGS. 44A and 44B are views each showing the sixth example of how avideo code stream is segmented on the adaptation layer in the fourthembodiment;

FIGS. 45A and 45B are views each showing the seventh example of how avideo code stream is segmented on the adaptation layer in the fourthembodiment;

FIGS. 46A to 46D are views each showing the eighth example of how avideo code stream is segmented on the adaptation layer in the fourthembodiment;

FIG. 47 is a view for explaining an example of how stuffing is performedon the adaptation layer in the fourth embodiment;

FIG. 48 is a block diagram showing the second example of the arrangementof the multiplexer in the fourth embodiment;

FIG. 49 is a view showing an example of the code stream generated on theFlexMux layer of the multiplexer having the arrangement shown in FIG. 48in the fourth embodiment;

FIG. 50 is a view for explaining the boundaries between the access unitsand another example of the arrangement of resync markers in a frame inthe fourth embodiment;

FIG. 51 is a view for explaining an example of how error protection isswitched in accordance with the degree of importance of each region inthe frame in the fourth embodiment;

FIGS. 52A to 52C are views each showing another example of the format ofan access unit in the fourth embodiment;

FIG. 53 is a block diagram showing the circuit arrangement of an encoderin the encoding apparatus shown in FIG. 1; and

FIG. 54 is a block diagram showing the circuit arrangement of a decoderin the decoding apparatus shown in FIG. 2.

BEST MODE OF CARRYING OUT THE INVENTION

Embodiments of the present invention will be described below withreference to the accompanying drawings.

FIG. 1 shows the arrangement of an encoding apparatus according to anembodiment of the present invention. A video picture input by a camera101 is converted into a digital signal by an A/D converter 102. Thedigital signal is input to an encoder 103. The encoder 103 performshigh-efficiency compress-encoding of the video signal by DCTtransformation, quantization, variable length encoding, dequantization,inverse DCT transformation, motion compensation, and the like, therebygenerating an encoded data stream. In this encoding operation, importantinformation required for decoding is inserted in the data stream. Theimportant header information in the encoded data stream is input to animportant header information reconstruction circuit 104 to betemporarily held therein. A bit string reconstruction circuit 107follows the encoder 103. In the circuit 107, the final code stream to betransmitted to a transmission path, i.e., a data stream complying withMPEG2 or the like, is determined.

In the bit string reconstruction circuit 107, first of all, a syncsignal determined by a sync signal circuit 105 is added to the head ofthe data stream in a predetermined bit stream unit. Thereafter,designation information is inserted in the bit stream by adesignation-information insertion circuit 106. The insertion of thisdesignation information in the bit stream allows important headerinformation to be added to the bit stream. Assume that important headerinformation is inserted immediately after the designation information.The important header information is extracted from the important headerinformation reconstruction circuit 104 to be added to the bit stream.The details of this bit stream configuration will be described laterwith reference to FIGS. 4A to 4C and 5A to 5E.

The bit stream finally determined by the bit string reconstructioncircuit 107 is multiplexed with other pieces of encoded information suchas speech information and character information by a multiplexer 108 andoutput to a transmission path 110. Note that an arbitrary part of theheader information may be designated as important header information bythe user from outside the encoder 103.

FIG. 2 shows the arrangement of a decoding section associated with thepresent invention.

The transmitted bit stream is demultiplexed into picture information,speech information, character information, and the like by ademultiplexer 121. The picture information bit stream is subjected tosynchronization detection in a synchronization detector 122 to detectthe decoding start position of the bit stream. This information is sentto a decoder 124, which starts or restarts decoding processing. Decodingis started from the header information on the uppermost layer. An errorcheck circuit 125 checks whether errors have been introduced into thesedecoded signals. If introduction of an error is determined, since thecorresponding portion cannot be used, the corresponding information issent to an important information circuit 126. In decoding the headerinformation on the next layer, after synchronization detection isperformed by the synchronization detector 122, the same bit stream istransferred to a designation information determination circuit 123, inwhich the contents of the designation information are checked. With thisoperation, it is checked whether important header information has beenadded. If the information has been added, the type and adding positionof the important header information are detected. An operationinstruction is supplied from the designation information determinationcircuit 123 to the decoder 124 on the basis of the detection result. Thedecoder 124 decodes the header information on the current layer and theimportant header information added thereto. The result obtained bydecoding the important header information is transferred to theimportant information circuit 126 to be temporarily held therein. If anerror introduction confirmation signal is received from the error checkcircuit 125, it indicates that the important header information cannotbe used on the upper layer. In this case, therefore, the decoder 124substitutes the important header information sent on the current layerfor the important header information on the upper layer to continue thedecoding processing with respect to the subsequent code stream. Thedecoded information such as picture information is converted into ananalog signal by a D/A circuit 127 to be displayed on a monitor 128.

The structure of a picture code stream used in this embodiment will bedescribed next.

FIGS. 3A and 3B show the concept of a frame divided into a plurality oflayers.

One frame 200 is broken up into a large number of slices (macroblocklines) 201 each constituted by 16 (pixel)×16 (pixel) macroblocks (FIG.3A). Each slice 201 is a set of macroblocks 203 (FIG. 3B). The frame 200as a whole corresponds to the uppermost layer. Each slice 201corresponds to the next layer. Each macroblock 203 corresponds to thelayer next to the next layer.

FIGS. 4A, 4B, and 4C show examples of the data structures on therespective layers in FIGS. 3A and 3B.

FIG. 4A shows a bit stream on the uppermost layer corresponding to FIG.3A. FIG. 4B shows a conventional bit stream on the slice layercorresponding to the slice in FIG. 3B. FIG. 4C shows a newly proposedbit stream on the slice layer corresponding to the slice in FIG. 3B.

As shown in FIG. 4A, a picture code on the frame layer, i.e., aone-frame picture code, starts from a sync signal (picture start code;PSC) indicating the start position of a picture. A time reference (TR)indicating the timing at which the frame is reproduced, and typeinformation (PT) indicating a predictive encoding type such asinterframe encoding or intraframe encoding follow the PSC. Quantizationstep size information (PQ) follows the PT. These pieces of informationTR, PT, and PQ are required for decoding processing or display of theentire frame. If these pieces of information are destroyed owing to theintroduction of errors or the like, decoding or display cannot beproperly performed even if synchronization is established on thesubsequent layer. Lower layer information is stored in “Data” after“PQ”. FIG. 4B shows a typical bit stream of “Data”.

As shown in FIG. 4B, on the slice layer, a picture code stream of eachslice 201 starts from a sync signal (SSC) indicating the start of thecode, and prediction type information (SPT) and a slice number (SN)follow. Finally, quantization step size information (SQ) is set. “Data”after “SQ” is information on the macroblock layer lower than the slicelayer.

The structure of the slice layer used in the first embodiment will bedescribed next with reference to FIG. 4C.

As described above, the information in FIG. 4A is important information.If this information cannot be used, the frame cannot be properly decodedeven if the information on the slice layer lower than the frame layer isnot destroyed. To properly decode the information on the slice layerlower than the frame layer even if the information in FIG. 4A cannot beused, it is required to recognize that the contents of the headerinformation in FIG. 4A correspond to the slice layer. In the firstembodiment, therefore, a code having a predetermined bit patternindicating designation information is prepared in “SPT.”. When this codeappears, the header information in FIG. 4A, which has already beentransmitted, is transmitted again on the slice layer. In this case, “TR”and “PT” are transmitted (in this case, “SPT” is used as designationinformation, and “PT” is required because “ISPT” does not indicate theprediction type). If no error is introduced into the frame layer in FIG.4A, pieces of information (TR and PT) are not used. If the informationon the frame layer is destroyed owing to an error or the like, decodingprocessing can be continued by using the pieces of information (TR andPT) in FIG. 4C as substitutes.

FIGS. 5A to 5E show other examples to be used in place of the examplesin FIGS. 4A to 4C.

The frame layer in FIG. 5A is identical to that in FIG. 4A, but each ofthe slice layers in FIGS. 5B and 5C differs in designation informationinserted in the header information from those in FIGS. 4B and 4C. Ineach of the slice layers shown in FIGS. 4B and 4C, the designationinformation is prepared in “SPT”. In each of the slice layers in FIGS.5B and 5C, a new bit (IS) is inserted. This bit IS is one bit that canbe two types of identification information. “IS” may consist of two bitsto represent four types of identification information.

When “IS” indicates that the important information on the frame layerfollows, “TR” is transmitted after “IS” FIG. 5C. On the decoding side,if the information on the frame layer is destroyed owing to an error orthe like, “TR” on the slice layer is used. In this case, since “SPT”represents a prediction type alone, “PT” need not be transmitted againon the slice layer unlike the case shown in FIGS. 4A to 4C.

FIG. 5D shows a modification of the bit stream in FIG. 5B. In this case,no “SPT” is transmitted on the slice layer. In retransmitting theimportant information on the frame layer in accordance with theinstruction of “IS”, “TR” and “PT are required on the slice layer, asshown in FIG. 5E.

FIGS. 6A and 6B show the concept of a frame constituted by a singlelayer, and a bit stream.

In this case, as shown in FIG. 6A, the frame is simply divided intoblocks (macroblocks). As shown in FIG. 6B, a one-frame picture codestream is synchronized by using only a sync signal PSC. In this case,since “TR” and “PT” are important as well, if the pieces of informationare destroyed, the subsequent information cannot be decoded even if itis properly transmitted. A mechanism of retransmitting these importantpieces of information by some method is effective in such a case. In theevent of a random error, in particular, the probability that both thepieces of information TR and PT are destroyed can be greatly reduced ascompared with a case in which the pieces of information are transmittedonly once. In the event of a burst error as well, if the pieces ofinformation TR and PT are retransmitted a certain period of time afterthey are transmitted for the first time, the probability that both thepieces of information are destroyed can be reduced. In the bit streamshown in FIG. 6B, “IS” is inserted after the important pieces ofinformation TR, PT, PQ, and the like. With the instruction representedby this signal, “TR”, “PT”, and the like an be inserted after “IS”. Forthe above reason, the designation information IS is preferablytransmitted a time period equal to or longer than the statisticalduration of a burst error after important information is transmitted.

FIG. 7 shows another example of the arrangement of the encoding sectionassociated with the present invention.

The picture input by a camera 301 is converted into a digital signal byan A/D converter 302 and input to an encoder 303. A bit streamreconstruction circuit 307 follows the encoder 303. The bit streamreconstruction circuit 307 determines a final bit stream to be sent to atransmission path. When a network which is vulnerable to errors is to beused, a refresh operation without prediction is generally performed atpredetermined intervals to minimize the possibility of propagation of anerror which cannot be corrected. Such a refresh operation can beperformed with respect to the overall frame (in this case, theprediction type of frame is intraframe encoding). However, since theamount of information generated in a refresh operation (intraframeencoding) is much larger than that in interframe encoding, it isdifficult to use this technique for low-bit-rate encoding transmission.For this reason, it is preferable to use a technique of completingrefresh for one frame in a period of time required for a plurality offrames by performing refresh for only part of each of a plurality ofconsecutive frames. In addition, when an error is detected on thedecoding side, it is important to cause only the part in error to beretransmitted by outputting a retransmission request.

To realize these operations, the prediction type must be switchedbetween intraframe encoding and interframe encoding in the process ofencoding in the encoder 303. Assume that refresh is to be performed foronly a predetermined part (the specific slice shown in FIGS. 3A and 3Bin this case), since the prediction type of this slice differs from thatof the preceding slice, this information is very important. In addition,since the quantization step size in a refresh operation greatly differsfrom that in interframe encoding, this as important information to beadded by the user from outside the encoding processing changeinformation circuit 306.

FIG. 8 shows an example of the arrangement of a decoding apparatuscorresponding to the encoding section in FIG. 7. A transmitted codestream is demultiplexed into picture information, speech information,character information, and the like by a demultiplexer 320. The pictureinformation bit stream is subjected to synchronization detection in asynchronization detector 321 to detect the decoding start position ofthe bit stream. When this information is sent to a decoder 323, decodingprocessing is started or restarted. The bit stream is also transferredto a designation information determination circuit 322, in which thecontents of the designation information are determined. When refresh canbe performed, since it suffices if the type of decoding processing canbe changed in accordance with the prediction type, i.e., intraframeencoding or interframe encoding, in response to this designationinformation, a switch for switching an intraframe decoder 324 and aninterframe decoder 325 in an decoder 323 is switched in accordance witha signal from the designation information determination circuit 322.Decoding processing for a slice for refresh is executed by theintraframe decoder 324. This intraframe decoding processing iscontrolled in information is important.

In the encoding apparatus shown in FIG. 7, when the encoder 303 performsencoding for refresh, the information required for encoding is sent to adesignation information insertion circuit 305. The important informationrequired for the above refresh operation is stored in an encodingprocessing change information circuit 306 in advance. The bit streamreconstruction circuit 307 adds the sync signal determined by a syncsignal circuit 304 to the head of the slice bit stream which has beenencoded for refresh. Thereafter, designation information indicating thatthe data has been refreshed is inserted in the bit stream by thedesignation information insertion circuit 305. In this state, since theabove important information required to decode the refreshed picturedata can be added, the required important information is extracted fromthe encoding processing change information circuit 306 to be added tothe slice bit stream. The details of this bit stream format will bedescribed with reference to FIGS. 9A and 9B.

The bit stream finally determined by the bit stream reconstructioncircuit 307 is multiplexed with other encoded pieces of information suchas speech information and character information by a multiplexer 308.The resultant data is sent to a transmission path 310. Note thatarbitrary information can be designated accordance with importantinformation such as the above quantization step size. The pictureinformation decoded by the intraframe decoder 324 or the interframedecoder 325 in the decoder 323 is converted into an analog signal by aD/A circuit 326 and displayed on a monitor 327.

FIGS. 9A and 9B show the format of a frame subjected to refresh, and thestructure of a corresponding picture code stream.

A frame 351 is divided into a plurality of slices. Assume that a slice353 for refresh is transmitted after a slice 352 to be subjected tointerframe encoding (FIG. 9A). A next slice 354 is subjected tointerframe encoding again. FIG. 9B shows the format of the bit stream tobe transmitted in this case. Portions 361, 362, and 363 of this bitstream correspond to the slices 352, 353, and 354 in FIG. 9A.Designation information indicating refresh using intraframe encoding isinserted in “SPT2” contained in the slice bit stream for refresh. Thesubsequent information, “SQ2”, indicates the quantization step sizeprepared for refresh. All “Data 2” is decoded as a result of intraframeencoding.

FIGS. 10A and 10B show other examples of the contents of the importantinformation. FIG. 10A shows a beat stream on the frame layer. FIG. 10Bshows a bit stream on the slice layer.

Referring to FIGS. 4A to 4C, on the slice layer, information followingthe designation information SPT is “TR”. This information may expressthe display timing, but the number of bits associated with thisexpression may become large in some case. To prevent this inconvenience,in the case shown in FIGS. 10A and 10B, a technique of encoding thedifference between given information and corresponding information whichhas been previously transmitted is employed. This technique is generallyused for compress-encoding.

More specifically, if TR is 0 to 255, eight bits are required to expressthese values. Assume, however, that a condition that there is no lowspeed shot corresponding to three frames or more can be established. Inthis case, since adjacent frames are not separated from each other bythree frames or more in a display operation, it suffices if the relativetime reference can express four states (the number of low speed shots is0, 1, 2, and 3). At this time, two bits are enough for “TR”. The numberof bits can therefore be reduced. In this case, however, since theimmediately preceding information which has already been decoded isrequired, the display timing cannot be determined by only “TR” at thisportion.

FIG. 10B shows an example of the bit stream to be transmitted on theslice layer with the above difference TR (DTR in FIG. 10B) beingimportant header information. After “DTR” is decoded, the true TR of thecurrent frame can be calculated by adding “DTR” to the information TR ofthe bit stream of the decoded preceding frame on the frame layer whichcorresponds to FIG. 10A.

FIG. 11 shows a circuit for performing decoding processing in the caseshown in FIGS. 10A and 10B. This circuit in FIG. 11 operates uponreplacing the decoding section in FIG. 2. First of all, the decodingstart position of the bit stream sent from the demultiplexer 121 isdetected by the synchronization detector 122, and “TR”, “PT”, and thelike on the frame layer are decoded by a decoder 401. At the same time,the decoded information TR is stored in a memory (2) 404. An error checkcircuit 402 checks the presence/absence of errors in the header piecesof information. The result is transferred to a memory (1) 403 (the aboveprocessing is for the bit stream in FIG. 1A). With regards to the slicelayer in FIG. 10B, first of all, the designation informationdetermination circuit 123 determines “SPT”. The decoder 401 then decodes“DTR” and “PT”. “DTR” is transferred to the memory 403. If it is foundfrom the information sent from the error check circuit 402 that theheader information (TR) on the upper frame layer cannot be used owing toan error or the like, a request signal is output from the memory 403 tothe memory 404 to transfer the information TR of the preceding frame,which has already been stored in the memory 404, to the memory 403. Inthe memory 403, this information TR and the above information DTR of thecurrent frame are added together to form “TR” of the current frame. Thisinformation is returned to the decoder 401 to continue the decodingprocessing. The information TR is also transferred to the memory 404 toallow it to be used for the same processing in the next frame.

FIG. 12 shows a case in which a pattern, of bit patterns prepared forother header information, which is not used is used as designationinformation.

Assume that a 2-bit pattern is assigned as “SPT” in advance. In thiscase, there are three prediction types, namely I (intraframe encoding),P (forward predictive encoding, and B (bidirectionally predictiveencoding), to which bit patterns of 00, 01, and 10 are respectivelyassigned. Since information corresponding to “11” is not used, this codeis used as designation information. That is, if “SPT” is “11”, it doesnot indicate any prediction type but indicates that importantinformation follows. Note that the important information indicated by adesignation information may be header information (TR, PT, PQ) or partthereof. Alternatively, this information may contain subsequent data(e.g., “Data” in FIG. 4A). These pieces of information can be changed inaccordance with a request from the system, the frequency of occurrenceof network errors, the required encoding rate, and the like.

As described above, according to the first embodiment, if importantinformation such as header information is lost, information forreconstructing the important information is added/transmitted inaccordance with an instruction of predetermined designation information.For this reason, even if an error or the like occurs in important headerinformation, and the information cannot be reconstructed, decodingprocessing can be properly continued by using designation informationtransferred afterward and reconstructing information designated by thedesignation information.

The second embodiment of the present invention will be described next.

The overall arrangement of an encoding apparatus according to the secondembodiment is almost the same as that of the encoding apparatus inFIG. 1. In the second embodiment, each frame (also a picture or VOP) isencoded so as to be broken up into small regions (the regions enclosedwith the dotted lines in FIG. 13) referred to as macroblocks. Inaddition, to allow each code stream in a frame to restoresynchronization when an error is introduced into a picture code streamobtained by encoding a picture signal, the frame is encoded in units ofvideo packets (the regions enclosed with the solid lines in FIG. 13)each constituted by one or a plurality of macroblocks.

FIGS. 14A to 14D show an example of the picture code stream output fromthe encoding apparatus. FIG. 14A shows the overall picture code streamof one frame (VOP). A VOP start-code (“VSC” in FIG. 14A) as a sync codewhich can be uniquely decoded, and a VOP header (“VOP header” in FIG.14A) containing header information about the VOP are added to the headof the VOP.

The VOP code stream is further segmented into video packet code streamscontaining macroblocks (“MB data” in FIG. 14A). A sync code referred toas a resync marker (“RM” in FIG. 14A) which can be uniquely decoded, anda video packet header (“Video packet header” in FIG. 14A) following theresync marker are added to the head of the picture code stream of eachvideo packet. Note, however, that since the VOP start code and the VOPheader are added to the first video packet of the VOP, neither resyncmarker (RM) nor video packet header (Video packet header) are added tothe first video packet.

FIG. 14B shows an example of the header information contained in the VOPheader. Referring to FIG. 14B, the modulo time base (MTB) and the VOPtime increment (VTI) are time pieces of information of the VOP. Thesepieces of information are used to define the decoding and displaytimings of the VOP frame.

The relationship between the time of a VOP, the modulo time base (MTB),and the VOP time increment (VTI) will be described below with referenceto FIG. 15. The VOP time increment is information indicating the time ofthe VOP with a precision of milliseconds, and takes the value of theremainder obtained by dividing the time of the VOP by 1,000 milliseconds(1 sec). The modulo time base is information indicating the time of theVOP with a precision of seconds, and takes “0” if the time of the VOP iswithin the same second as the immediately preceding encoded VOP. Ifthese VOPs fall within different second durations, the modulo time basetakes the difference.

If, for example, the times (millisecond) of VOPs take 0, 33, 700, 1,000,1,300, 1,833, and 2,067, the VOP time increments respectively take theremainders obtained by dividing these values, i.e., 0, 33, 700, 0, 300,833, and 67 by 1,000. The module time base takes 1 when the valueobtained by dividing the time by 1,000 and dropping all digits after thedecimal point (0, 0, 0, 1, 1, 1, or 2 in FIG. 15) differs from that ofthe immediately preceding VOP. That is, the modulo time bases of theVOPs corresponding to time=1, 1000, 2067 take “1”, and those of theremaining VOPs take “0”. In addition, the modulo time bases may beencoded using variable-length codes. For example, when the modulo timebases are 0, 1, 2, . . . , variable-length codes “1”, “01”, “001”, . . .can be set in correspondence with the modulo time bases.

The VOP prediction mode (VPT) in FIG. 14B is information indicating thepredictive encoding mode (I, B, or P) of the overall VOP. The VOPquantization parameter (“PQ” in FIG. 14B) is information indicating thequantization step width used to encode the VOP. When, however, a VOP isto be encoded upon being divided into a plurality of video packets,since the quantization step width must be changed in units of videopackets, this information may be used as information indicating thequantization step width of the first video packet.

FIGS. 14C and 14D show examples of the information contained in a videopacket header as header information to be added to a video packet. Themacroblock number (“MBA” in FIGS. 14C and 14D) is information indicatingthe number of the first macroblock of the video packet. The video packetquantization parameter (“SQ” in FIGS. 14C and 14D) is informationindicating the quantization step width of the video packet. The headerexpansion code (“HEC” in FIGS. 14C and 14D, which correspond to “IS” inFIGS. 5B to 5E) is a flag indicating whether important information to beduplexed (multiplexed) with the video packet header is added. When “HEC”is “0”, no important information is added, as shown in FIG. 14C. When“HEC” is “1”, important information is added, as shown in FIG. 14D. Inthe case shown in FIG. 14D, to be able to reconstruct the timeinformation of the picture frame, the modulo time base (“MTB” in FIG.14D) and the VOP time increment (“VTI” in FIG. 14D), which indicate thetime of the VOP, are added as important information without anymodification.

FIG. 16 is a block diagram showing the arrangement of the decodingapparatus for the image code stream shown in FIGS. 14A to 14D. The samereference numerals in FIG. 16 denote the same parts of the decodingapparatus as in FIG. 2, and only the differences between the apparatuseswill be described below. In addition to the arrangement of the decodingapparatus in FIG. 2, the decoding apparatus in FIG. 16 includes a VOPheader decoder 601, a video packet header decoder 602, a time decoder603, and a buffer memory 621.

Upon detection of a VOP start code, a synchronization detector 122notifies a decoder 124 of a signal indicating that the code is detected.In response to this notification, the decoder 124 sends a code streamcontaining a VOP header following the VOP start code, i.e., the firstvideo packet, to the VOP header decoder 601, which decodes the VOPheader. The VOP header decoder 601 decodes the time information, VOPencoding mode information, and the VOP quantization parameter containedin the VOP header. Of these pieces of information, the time information,i.e., the modulo time base and the VOP time increment, are sent to thetime decoder 603, which decodes the time information.

The time decoder 603 decodes the sent modulo time base and VOP timeincrement, and checks the presence/absence of an error. The time decoder603 checks the presence/absence of an error by checking whether the timedecoded from the modulo time base and the VOP time increment can be anactual time. When, for example, the encoded picture signal is an NTSCsignal, since the frame rate is 30 Hz, the time should take a multipleof 1/30 sec (=33 msec). If, therefore, the decoded time is not amultiple of 1/30 sec, a transmission path error has occurred in themodulo time base and the VOP time increment. When the encoded picturesignal is a PAL signal, it is checked whether the time is a multiple of1/25 sec.

As a reference value for this error check, a predetermined value may beset in the encoding decoding apparatus in accordance with the type ofpicture signal (PAL, NTSC, CIF, or the like), or information indicatinga reference value may be inserted in a system information code stream(not shown) or part of a picture code stream.

When time information decoding and error checking in the time decoder603 are complete, a signal indicating the presence of an error is sentto the VOP header decoder 601 if it is determined that the error ispresent. If it is determined that no error is present, a signalindicating the decoded time information is sent to the VOP headerdecoder 601. When there is no error in the time information, the VOPheader decoder 601 stores this time information in the buffer memory621, and sends a combination of the information and other pieces ofinformation to the decoder 124. If there is an error in the timeinformation, the first video packet code containing the VOP header isdiscarded, and decoding of the next video packet is started.

Upon detection of a resync marker (RM), the synchronization detector 122sends a signal indicating the detection of the marker to the decoder124. In response to the signal, the decoder 124 sends a code streamcontaining a video packet header following the resync marker, i.e., thesecond or subsequent video packet, to the VOP header decoder 601, whichdecodes the video packet header. The video packet header decoder 602decodes the macroblock number (MBA), the video packet quantizationparameter (SQ), and the header expansion code (HEC) which are containedin the video packet header.

If the header expansion code (HEC)=“1”, the succeeding modulo time baseand VOP time increment are sent to the time decoder 603, which decodesthe time information. The time decoder 603 decodes the sent modulo timebase and VOP time increment, and checks the presence/absence of anerror, as in the case of decoding of the preceding VOP header. When timeinformation decoding and error checking in the time decoder 603 arecomplete, a signal indicating the presence of an error is sent to thevideo packet header decoder 602 if it is determined that the error ispresent. If it is determined that no error is present, a signalindicating the decoded time information is sent to the video packetheader decoder 602. In the video packet header decoder 602, if there isan error in the time information, the code stream of the video packetcontaining the VOP header is discarded, and the next video packet isdecoded.

If there is no error in the time information, the time information iscompared with the time information stored in the first buffer memory621, i.e., the time information obtained from the immediately precedingencoded video packet to determine the VOP contained in the current videopacket. If they coincide with each other, it is determined that thevideo packet is contained in the same VOP in which the immediatelypreceding encoded video packet is contained, and sends a signalindicating the information of the video packet decoded by the decoder124, thereby performing decoding. In contrast to this, if the decodedtime information differs from the time information stored in the buffermemory 621, it is determined that the video packet to be decoded iscontained in a VOP different from the VOP in which the immediatelypreceding encoded video packet is contained. In this case, the decodedtime information is recorded on the buffer memory 621. In addition, aVOP division signal indicating that a VOP region is present between theimmediately preceding video packet and this video packet, and the videopacket is decoded into a new VOP, the decoded time information, and asignal indicating the information of the decoded video packet header aresent to the decoder 124. Upon reception of the VOP division signal, thedecoder 124 determines that the immediately preceding encoded videopacket is the last video packet of the VOP, and performs VOP decodingend processing. The decoder 124 also determines that the video packet tobe decoded from now on is the first video packet of the next VOP, andkeeps decoding the video packet.

With this processing, even if a VOP start code and a VOP header are lostowing to errors, the VOP boundary can be determined on the basis of thetime information of the video packet header, and correct decoding timeinformation can be obtained. The quality of the decoded picturetherefore improves.

FIGS. 17A to 17C show the second examples of the VOP header and thevideo packet header. These examples differ from those shown in FIGS. 14Ato 14D in that CRC check bits for checking the presence/absence oferrors in the pieces of information contained in the headers are added.

FIG. 17A shows the VOP header. Referring to FIG. 17A, “CW1” is a checkbit for performing a CRC check with respect to the modulo time base, theVOP time increment, the VOP encoding mode, and the VOP quantizationparameter which are contained in the VOP header.

FIGS. 17B and 17C show the video packet headers. Referring to FIG. 17B,“CW2” is a check bit for performing a CRC check with respect to themacroblock number, the video packet quantization parameter, and theheader expansion code. Referring to FIG. 17C, “CW3” is a check bit whichis present in only a video packet with HEC=“1”, i.e., a video packet towhich important information is added, and is used to perform a CRC checkwith respect to the important information, i.e., the modulo time baseand the VOP time increment.

FIG. 18 shows the arrangement of a decoding apparatus for the picturecode stream shown in FIGS. 17A to 17C. The same reference numerals inFIG. 18 denote the same parts of the decoding apparatus as in FIG. 16.This apparatus differs from that shown in FIG. 16 in that a CRCdetermination circuit 605 is added. Only this difference will bedescribed below.

The VOP header decoder 601 decodes the information contained in a VOPheader, and performs a CRC check with respect to the VOP header by usingthe CRC check bit CW1. If the presence of an error is determined by theCRC check, the VOP header and the video packet contained therein arediscarded, and decoding of the next video packet is started.

The video packet header decoder 602 decodes the information contained ina video packet header, and performs a CRC check with respect to thevideo packet header by using the CRC check bit CW2. If the presence ofan error is determined by the CRC check, the video packet header and thevideo packet contained therein are discarded, and decoding of the nextvideo packet is started. If it is determined that there is no error, andthe decoded header expansion code HEC is “1”, added important pieces ofinformation (MTB and VTI) following “HEC” are decoded. The CRC check bitCW3 is used to check the presence/absence of an error in the importantinformation. If it is determined that there is no error, comparisonbetween these pieces of information and the time pieces of informationin the VOP header and another video packet header, VOP segmentationprocessing, and the like are performed, as in the case of the decodingapparatus in FIG. 16.

As described above, in the second embodiment, since pieces ofinformation indicating the time of a picture frame are added to eachvideo packet in the frame, even if the time pieces of informationcontained in the VOP header are lost due to errors, the correct timeinformation can be decoded on the basis of the important information inthe video packet header. The decoding apparatus can thereforereconstruct and display the picture at the correct time.

In addition, since VOP boundary determination is performed by comparingthe time information in a video packet header with the time informationin the VOP header or another video packet header, even if the VOP startcode is lost due to an error, the VOP boundary can be properly decoded.As a result, the quality of the decoded picture improves.

In the above case, the header expansion code (HEC) in each video packetindicates whether important information is contained. For example,HEC=“1” may be set in all video packets to add important information, orHEC=“1” may be set in only some video packets. By controlling the numberof video packets in which important information is added in accordancewith the presence/absence of a transmission path error, the importantinformation can be efficiently protected with a small overhead.

Assume that the decoding time is expressed by a module time base (MTB)and VOP time increment (VTI) as in the above case. In this case, whenMTB=0, even if the time information cannot be properly decoded, thedecoding time error is one second or less. If, however, “MTB” is notproperly decoded in a VOP with “MTB” other than “0”, a large error inseconds occurs in the decoding time of a subsequent VOP. For thisreason, in a VOP with MTB=0, HEC=0 may be set in all the video packets,or HEC=1 may be set in only a small number of video packets while HEC=1is set in all or a large number of video packets in a VOP with “MTB”other than “1”, thereby properly decoding “MTB”.

In the second embodiment, as the important pieces of information to beduplexed with a video packet header, pieces of information indicatingthe time (modulo time base and VOP time increment) are used. In additionto these pieces of information, for example, a video packet header maybe duplexed with information indicating an encoding mode, informationindicating a quantization parameter, information associated with motioncompensation, and motion vector information.

Assume that VOPs are to be encoded while a plurality of VOP predictionmodes (e.g., intraframe predictive VOP (I-VOP), forward predictive VOP(P-VOP), and bidirectional predictive VOP (B-VOP)) are switched in unitsof VOPs. In this case, if this information about the VOP prediction modecannot be properly decoded, the corresponding VOP cannot be decoded.When VOP prediction mode information is also contained as duplexinformation in a video packet header, even if the VOP prediction modeinformation of the VOP header is lost due to an error, the VOP can bedecoded on the basis of the VOP prediction mode information contained inthe duplex information in the video packet header. Such a case will bedescribed below.

FIGS. 27A and 27B show the third examples of the video packet header inthe second embodiment. The picture code stream and VOP header of anoverall frame (VOP) are the same as those in FIGS. 14A and 14B. FIGS.27A and 27B respectively show the video packet headers with headerexpansion HEC=“0” and HEC=“1”. These video packet headers differ fromthose in FIGS. 14A to 14D in that when HEC=“1”, VOP prediction modeinformation (“VPT” in FIG. 27B) is contained in addition to pieces ofinformation indicating the time (“MTB” and “VTI” in FIG. 27B).

The overall arrangement of a decoding apparatus for the picture codestream shown in FIGS. 27A and 27B is the same as that in FIG. 16.However, the operation of the video packet header decoder 602 isdifferent from that in FIG. 16. In addition, this apparatus differs fromthat in FIG. 16 in that VOP prediction mode information (VPT) isrecorded on the buffer memory 621 as well as time pieces of information(modulo time base and VOP time increment). The operation of the decoder,mainly the operation associated with these different points, will bedescribed below.

Upon detection of a VOP start code, the synchronization detector 122sends a signal indicating the detection of this code to the decoder 124.In response to this signal, the decoder 124 sends a code streamcontaining a VOP header following the VOP start code to the VOP headerdecoder 601 to decode the VOP header. The VOP header decoder 601 decodesthe time pieces of information (MTB and VTI), the VOP encoding modeinformation (VPT), and the VOP quantization parameter (PQ) which arecontained in the VOP header. Of these pieces of information, the modulotime base (MTB) and the VOP time increment (VTI) are sent to the timedecoder 603, in which the time information is decoded.

The time decoder 603 decodes the sent modulo time base and VOP timeincrement, and checks the presence/absence of an error. Thepresence/absence of an error is checked by checking whether the timeinformation decoded from the modulo time base and the VOP time incrementcan be an actual time. If, for example, the encoded picture signal is anNTSC signal, since the frame rate is 30 Hz, the time information shouldtake a multiple of 1/30 sec (=33 msec). If, therefore, the decoded timeinformation is not a multiple of 1/30 sec, it is determined thattransmission path errors are present in the modulo time base and the VOPtime increment. If the encoded picture signal is a PAL signal, an errorcheck is performed by checking whether the time information takes amultiple of 1/25 sec.

As a reference value for this error check, a predetermined value may beset in the encoding/decoding apparatus in accordance with the type ofpicture signal (PAL, NTSC, CIF, or the like), or information indicatinga reference value may be inserted in a system information code stream(not shown) or part of a picture code stream.

When time information decoding and error checking in the time decoder603 are complete, a signal indicating the presence of an error is sentto the VOP header decoder 601 if it is determined that the error ispresent. If it is determined that no error is present, a signalindicating the decoded time information is sent to the VOP headerdecoder 601. When there is no error in the time information, the VOPheader decoder 601 further decodes the VOP prediction mode information(VPT). If there is no error in the VOP prediction mode information,either, the time information and the VOP prediction mode information arestored in the buffer memory 621, and are sent to the decoder 124,together with other pieces of information. If there is an error in thetime information or the VOP prediction mode information contained in theVOP header, the code stream of the video packet containing the VOPheader is discarded, and the next video packet is decoded.

Upon detection of a resync marker, the synchronization detector 122sends a signal indicating the detection of the marker to the decoder124. In response to this signal, the decoder 124 sends a code streamcontaining the video packet header following the resync marker to theVOP header decoder 601, which decodes the video packet header. The VOPheader decoder 601 decodes the macroblock number, the video packetquantization parameter, and the header expansion code which arecontained in the video packet header.

If header expansion code HEC=“1”, the modulo time base and the VOP timeincrement following “HEC” are sent to the time decoder 603, whichdecodes the time pieces of information. The time decoder 603 decodes thesent modulo time base and VOP time increment, and checks thepresence/absence of an error, as in the case of decoding of thepreceding VOP header. When time information decoding and error checkingin the time decoder 603 are complete, a signal indicating the presenceof an error is sent to the video packet header decoder 602 if it isdetermined that the error is present. If it is determined that no erroris present, a signal indicating the decoded time information is sent tothe video packet header decoder 602. If there is an error in the timeinformation, the video packet header decoder 602 discards the codestream of the video packet containing the video packet header, anddecodes the next video packet.

If there is no error in the time information, the VOP prediction modeinformation following the time information is decoded. If there is noerror in the VOP prediction mode information, either, the decoded timeinformation is compared with the time information stored in the buffermemory 621 to determine the VOP containing the video packet. If theycoincide with each other, it is determined that the video packet iscontained in the same VOP in which the immediately preceding encodedvideo packet is contained, and a signal indicating the information ofthe decoded video packet header is sent to the decoder 124, therebydecoding the video packet. In contrast to this, if the decoded timeinformation differs from the time information stored in the buffermemory 621, it is determined that the video packet to be decoded fromnow on is contained in a VOP different from the immediately precedingdecoded video packet. In this case, the decoded time information and VOPprediction mode information are recorded on the buffer memory 621, and aVOP segmentation signal indicating that this video packet is the firstpacket of the VOP, a signal indicating the decoded time information, anda signal indicating the information of the decoded video packet headerare sent to the decoder 124. Upon reception of the VOP segmentationsignal, the decoder 124 determines that the immediately precedingdecoded video packet is the last packet of the VOP, and performs VOPdecoding end processing. The decoder 124 also determines that the videopacket to be decoded from now on is the first video packet of the nextVOP, and performs VOP decoding start processing, thereby continuing todecode the video packet.

If the VOP prediction mode information contained in the video packetheader differs from the VOP prediction mode information recorded on thebuffer memory 621, the video packet may be decoded by using the VOPprediction mode information contained in the video packet header. Withthis operation, even if the VOP prediction mode information contained inthe VOP header cannot be properly-decoded, the video packet can bedecoded.

With this processing, even if a VOP start code and a VOP header are lostdue to errors, since the VOP boundary and the VOP prediction mode can beproperly identified from the time information and the VOP predictionmode information of the video packet header, the quality of the decodedpicture improves.

Assume that in decoding a VOP header or a video packet header, errorcheck information (CRC, stuffing bits, or the like) is present in apicture code stream, or a circuit for receiving a code stream from atransmission path/storage medium or a demultiplexer for demultiplexing areceived code stream into a picture code stream, a speech code stream,and the like has the function of determining the presence/absence of anerror in a code stream. In this case, the presence/absence of an errorin a decoded VOP header or video packet header may be determined byusing the determination result obtained by using such error checkinformation or such a circuit. If it is also determined by such a meansthat there are errors in these decoded pieces of information, thesepieces of information are not used for picture decoding. Alternatively,a video packet containing information in which the presence of an erroris determined may be discarded without being decoded.

FIGS. 28A and 28B show the fourth example of the video packet header inthe second embodiment. The picture code stream and VOP header of anoverall frame (VOP) are the same as those in FIGS. 14A and 17A. FIGS.28A and 28B respectively show the video packet headers with HEC=“0” andHEC=“1”. These video packet headers differ from those in FIGS. 17B and17C in that when HEC=“1”, a VOP prediction mode (“VPT”, in FIG. 28B) iscontained in addition to pieces of information indicating the time(“MTB” and “VTI” in FIG. 28B).

The overall arrangement of a decoding apparatus for the picture codestream in 28A and 28B is the same as that shown in FIG. 18. However, theoperation of the video packet header decoder 602 is different from thatin FIG. 18. In addition, this apparatus differs from that in FIG. 18 inthat VOP prediction mode information (VPT) is recorded on the buffermemory 621 as well as time pieces of information (modulo time base andVOP time increment). The operation of the decoder, mainly the operationassociated with these different points, will be described below.

The VOP header decoder 601 decodes the information contained in a VOPheader, and performs a CRC check with respect to the VOP header by usingthe CRC check bit CW1. If the presence of an error is determined by theCRC check, the VOP header and the video packet in which the VOP headeris contained are discarded, and decoding of the next video packet isstarted.

The video packet header decoder 602 decodes the information contained inthe video packet, and performs CRC check with respect to the videopacket header by using the CRC check bit CW2. If the presence of anerror is determined by the CRC check, the video packet header and thevideo packet in which the video packet header is contained arediscarded, and decoding of the next video packet is started. If it isdetermined that there is no error, and the decoded header expansion codeHEC is 1, duplexed important pieces of information (“MTB”, “VTI”, and“VPT” in FIG. 28B) following “HEC” are decoded. The CRC check bit CW3 isused to check whether an error is present in the duplexed importantinformation. If there is no error, comparison between these pieces ofinformation and the time pieces of information in the VOP header andanother video packet header, VOP segmentation processing, and the likeare performed, as in the case of the decoding apparatus in FIG. 16.

As described above, since pieces of information indicating the time arecontained in important information, even if the time informationcontained in a VOP is lost due to an error, correct time information canbe decoded from the important information in the video packet header.The decoding apparatus can therefore reconstruct and display the pictureat a correct time. In addition, since the time information in a videopacket header is compared with the time information in a VOP header oranother video packet header to perform VOP boundary determination, evenif a VOP start code is lost due to an error, a VOP boundary can beproperly decoded, and the quality of the decoded picture improves.

In addition, when VOP prediction mode information is also contained asduplexed information in a video packet header, even if the VOPprediction mode information in the VOP header is lost due to an error,the VOP can be decoded on the basis of the VOP prediction modeinformation contained as duplexed information in the video packetheader.

In the second embodiment, to prevent patterns identical to sync codes(Picture start code, VOP start code, Resync marker, and the like) frombeing generated in a VOP header and a video packet header, bits calledmarker bits may be added.

FIGS. 31A to 31D show an example of how marker bits are added to thecode streams in FIGS. 14A to 14D. Referring to FIGS. 31A to 31D,“marker” behind the VOP time increment (VTI) is a marker bit having apredetermined bit value (e.g., “1”).

FIGS. 32A to 32C show a comparison between a video packet header withoutany marker bit and a video packet header with a marker bit. Assume thatthe resync marker as a sync code is a 17-bit code word having a bitpattern of “00000000000000001”, the VOP time increment (VTI) is a codeword having an arbitrary 10-bit value, and “MTB” is a variable-lengthcode having “0” as the last bit.

If no marker bit is set, and “VTI” has a pattern of consecutive “0”s, abit pattern identical to that of the resync marker is generated, asshown in FIG. 32B. In the case shown in FIG. 32B, “0” of “MTB”,“0000000000” of “VTI”, and the subsequent bit stream of “000001”constitute the same pattern as that of the resync marker.

In contrast to this, as shown in FIG. 32C, by adding the marker bit “1”behind “VTI”, the number of consecutive “0”s in the video packet headeris limited to a maximum of 11 bits (the last one bit “0” of “MTB” and“0000000000” of “VTI”). A bit pattern identical to that of the resyncmarker is not therefore generated.

Note that a marker bit has a predetermined bit value (“1” in the caseshown in FIGS. 32A to 32C). For this reason, the decoding apparatus maydetermine the presence/absence of an error in a VOP header and a videopacket header by checking whether a marker bit has this predeterminedvalue.

Marker bits may be added to other code streams like those shown in FIGS.17A to 17C, 27A, 27B, 28A, and 28B in the second embodiment.

Such a code stream structure may be applied to code streams using theslice layer. FIG. 33 shows another code stream using the slice structurein the first embodiment.

Referring to FIG. 33, reference symbol SSC denotes a slice sync code;EPB, a bit having a bit value of “1” which is added to the code streamto prevent a portion other than a sync code (e.g., “SSC”) from havingthe same bit pattern as that of the sync code; MBA, informationindicating the number of the first macroblock of the correspondingslice; SQUATNT, a quantization parameter used in the slice; and GFID,information indicating the information contained in a picture header orpart of the information. When the sync codes SSCs are to be set at givenbyte positions in the code stream, stuffing bits SSTUF are set before“SSC”. “Macroblock Data” is the information of each macroblock.

“TR” is duplexed important information, which is time information(Temporal Reference). “TRI” is a 1-bit flag indicating whether “TR” isadded. When TRI=1, “TR” is added.

The third embodiment of the present invention will be described next.

FIG. 19 shows the overall arrangement of a video/speech encoderaccording to the third embodiment of the present invention. A videosignal 101A and a speech signal 102A which are to be compress-encodedare respectively input to a video encoder 111A and a speech encoder112A, which respectively compress the video and speech signals to outputa video code stream 121A and a speech code stream 122A. Since thearrangements of the video encoder and the speech encoder are disclosedin detail in a reference (Hiroshi Yasuda, “International Standard forMultimedia Encoding”, Maruzen (1994)) and the like, a detaileddescription thereof will be omitted.

The video code stream 121A and the speech code stream 122A aremultiplexed with a data code stream 103A by a multiplexer 130A. As aresult, a multiplexing code stream 135A is output.

FIG. 20 shows the overall arrangement of a video/speech encodercorresponding to the video/speech encoder in FIG. 19. A multiplexingcode stream 185A from the video/speech encoder is demultiplexed by ademultiplexer 180A. As a result, a video code stream 171A, a speech codestream 172A, and a data code stream 173A are output. The video codestream 171A and the speech code stream 172A are respectively input to avideo decoder 161A and a speech decoder 162A to be decoded. As a result,a reconstructed video signal 151A and a reconstructed speech signal 152Aare output.

FIGS. 21A and 21B show two examples of the video code stream 121A. Thevideo encoder 111A encodes a signal in units of pictures (frames orVOPs) to generate the video code stream 121A. Each picture is furtherbroken up into small regions referred to as macroblocks to be encoded.

A video code stream of an I picture starts from a picture start code(PSC) 201A (also a VOP start code) which is a code which indicates thepicture start position and can be uniquely decoded.

A picture header (PH) 202A (also a VOP header) follows the picture startcode 201A. The picture header 202A contains a PTR (Picture TemporalReference) 221A indicating the temporal position of the picture, apicture coding mode (PCM) 222A indicating the encoding mode of theoverall picture, and a picture quantization step size (PQ) 223A. Encodeddata 203A of each macroblock follows the picture header 202A.

FIG. 21B shows a case in which encoding is performed in units of sliceseach constituted by a plurality of macroblocks.

The code stream of each slice contains a resync marker (RM) 210A whichindicates the start position of the slice and can be uniquely decoded. Aslice header (SH) 211A and macroblock data (MB) 203A of each macroblockfollow “RM”. The slice header 211A contains an SMBN (Slice MacroblockNumber) 231A indicating the number of the first macroblock of the slice,and a quantization step size (SQ) 232A.

The resync marker 210A and the slice header 211A may be added for everypredetermined number of bits or at predetermined positions in thepicture frame. When encoding is performed to have such a slicestructure, even if an error is introduced into a video code stream,resynchronization can be established with the resync marker 210A whichcan be uniquely decoded. Since an error can be prevented frompropagating out of the slice, the quality of the reconstructed pictureimproves in the event of a transmission path error.

FIG. 22 shows an example of the multiplexing code stream 135Amultiplexed by the multiplexer. The multiplexing code stream 135A isconstituted by a plurality of multiplexed packets each having a videocode stream (VIDEO), a speech (audio) code stream (SPEECH), and adata/control information code stream (DATA) which are multiplexed torespectively have predetermined sizes. Referring to FIG. 22, sections301A, 302A, and 303A are multiplexed packets, respectively. Allmultiplexed packets may be fixed-length packets having the same length(the number of bits), or variable-length packets having differentlengths.

A multiplexing start code (MSC) 310A indicating the start position of amultiplexed packet is added to the head of each multiplexed packet. Amultiplexed header (MH) 311A, 312A, or 313A follows the multiplexingstart code 310A. A multiplexed payload (321A, 322A, or 323A in FIG. 22)obtained by multiplexing the video code stream 121A, the speech codestream 122A, and the data code stream 103A in FIG. 19 in units ofpackets follows the multiplexed header.

FIGS. 23A and 23B show the first example of the information contained inthe multiplexed header (MH) 311A. Referring to FIGS. 23A and 23B, amultiplexing code (MC) 351A is information indicating how a video codestream (Video), a speech code stream (Speech), and a data code stream(Data) are multiplexed in the multiplexed payload 321A. If atransmission path error occurs in this multiplexing code information(MC), the manner in which the code streams are multiplexed cannot berecognized. For this reason, the demultiplexer 180A cannot properlydemultiplex the video code stream, the speech code stream, and the datacode stream. The video decoder 161A and the speech decoder 162A cannottherefore properly decode either, resulting in a deterioration in thequality of the reconstructed video and speech signals.

To prevent such a situation, strong error protection is provided foreach multiplexed header (MH) by using an error check code and an errorcorrection code. Referring to FIGS. 23A and 23B, reference numeral 343A(CRC) denotes a CRC error check bit; and 354A (FEC), an error correctioncode check bit.

In the third embodiment, the multiplexed header (MH) of a multiplexedpacket containing a video code stream (Video) contains video headerinformation (VHD) 352A together with a multiplexing code information(MC). In the case shown in FIGS. 23A and 23B, “MH1” (311A) and “MH2”(312A) are multiplexed headers (MHs) containing the video headerinformation (VHD) 352A. The video header information (VHD) 352A isimportant information indicating the encoding mode or the like of theoverall picture (frame) in video encoding. If an error is introducedinto this information, the reconstructed picture greatly deteriorates.If, for example, a video code stream has the format shown in FIGS. 21Aand 21B, the picture header 202A or the slice header 211A or part of theinformation therein is set in a multiplexed header as the video headerinformation (VHD) 352A.

The third embodiment is characterized in that important information suchas a picture header in video encoding is inserted in a multiplexedheader in this manner, and an error correction code and an errordetection code are generated together with a multiplexing code (MC) toprovide strong error protection by using these codes. With thischaracteristic feature, the robustness against transmission path errorsimproves as compared with the conventional video encoding apparatuswhich provides no error protection for important information.

FIGS. 24A and 24B show the second example of the multiplexed header(MH). The same reference numerals in FIGS. 24A and 24B denote pieces ofinformation corresponding to those of the first example shown in FIGS.23A and 23B, and only the difference between the examples will bedescribed below. The second example differs from the first example inthat a multiplexed packet containing a video code stream (Video) has apicture pointer (ALP) 451A which indicates the position of the pictureor slice boundary of the video code stream and is contained in themultiplexed header, in addition to the video header information (VHD)352A.

If the picture pointer (ALP) 451A is not set, the video decoder 161Amust detect picture or slice boundaries in accordance with a picturestart code or a resync marker after the demultiplexer 180A demultiplexesa video code stream. In contrast to this, if the picture pointer (ALP)451A is contained in the multiplexed header, picture or slice boundariescan be detected with the picture pointer. Since strong error correctionis provided for the picture pointer in the multiplexed header, theprobability of correction detection of picture or slice boundariesincreases, and the quality of the reconstructed picture is improved.

In addition, the video header information (VHD) 352A may contain all orpart of the information contained in a picture or slice header.

FIG. 25 shows a case in which only picture time references (PTR1 andPTR2) 612A and 622A are contained as video header information, inaddition to corresponding multiplexing codes (MC1 and MC2) 611A and621A, in the multiplexed headers of multiplexed packets 601A and 601Bcontaining video code streams (Video).

Referring to FIG. 25, the multiplexed payload of the multiplexed packet601A contains a slice (Slice N) 613A at the end of the picture codestream with PTR=1, a picture start code (PSC) 614A of the subsequentpicture with PTR=2, a picture time reference (PTR 2) 615A with PTR=2, apicture coding mode (PCM2) 616A, and a first half portion (Slice 1) 617Aof the first slice of the code stream of the picture with PTR=2. Thepayload of the multiplexed packet 602A contains a second half portion(Slice 1) 623A of the first slice of the code stream of the picture withPTR=2, a resync marker (RM) 624A of the second slice, a slice header(SH2) 625A, and a second slice (Slice 2) 626A of the code stream of thepicture with PTR=2.

The multiplexed header (MH1) of the multiplexed packet 601A contains thePTR 612A of the picture with PTR=1 which has the code stream of the lastportion in the multiplexed packet 601A. Error protection is provided forthe PTR 612A, together with the multiplexing code (MC1) 611A, by usingan error correction code and an error detection code (CRC and FEC). Evenif, therefore, the PTR (615A) contained in the video code stream of amultiplexed payload cannot be properly decoded because of an error,since the PTR (612A) in the multiplexed header can be properly decoded,and the correct PTR can be obtained, the decoded picture can bedisplayed at the correct time.

In a video encoding scheme using a slice structure, if a PTR is insertedin the video header information 352A of a multiplexed packet containinga slice start code (resync marker) and a slice header, pictureboundaries can be determined on the basis of the PTR even if the picturestart code cannot be properly decoded because of an error. Assume thatthe picture start code (PSC) 614A or the PART 615A is lost. In thiscase, the PTR 622A contained in the multiplexed header of the nextmultiplexed packet is compared with the PTR (e.g., the PTR 612A)contained in the multiplexed header of the preceding multiplexed packet.If they do not coincide with each other, it is determined that a pictureboundary is present in the multiplexed packet 601A. In this case, properencoding can be started from the first slice (“Slice 2” of the RM 624Ain FIG. 25) having a resync mark in the multiplexed packet 602A.

When an encoding scheme in which the picture encoding mode is frequencychanged (e.g., an encoding scheme using B pictures) is used, picturecoding mode information may be contained in a multiplexed header.

FIG. 26 shows the third example of the multiplexing code stream. In thismultiplexing code stream, a picture or slice is set in each ofmultiplexed packets 701A, 702A, and 703A, and error protection isprovided for a picture header (PH1) 712A and a slice header (SH2) 722Ain multiplexed headers 751A and 752A, together with multiplexing codes(MC1 and MC2) 711A and, 721A. If pictures or slices as video codes andmultiplexed packets are prepared in pairs, since it is uniquely knownthat each multiplexed packet is always located at a picture or slicestart position, neither a picture start code nor a resync marker need bedetected from the demultiplexed picture code stream. As a result, theprocessing amount can be reduced. In addition, the use of a code highlyrobust against transmission path errors as a multiplexing start codewill reduce the probability that the start position of a picture orslice cannot be properly specified, and the picture or slice cannot bedecoded.

In the third embodiment, one picture/speech signal is encoded/decoded.However, the present invention can be equally applied to a case in whicha plurality of picture/speech signal encoding apparatuses are used toencode/multiplex a plurality of picture/speech signals, and a pluralityof picture/speech signal decoders are used to demultiplex/decode aplurality of picture/speech signals. In this case, the video headerinformation contained in multiplexed header information may containinformation for identifying a plurality of picture signals.

If a transmission code stream is generated by properly combining thethird embodiment with the first and second embodiments, more reliabletransmission of encoded information can be realized. In the thirdembodiment, a PTR (Picture Time Reference) indicating the time may behandled as a modulo time base and a VOP time increment like those in thesecond embodiment. By using these pieces of information, a check may beperformed using the regularity of the modulo time base and the VOP timeincrement as in the second embodiment.

A medium for storing information generated in the present invention willbe described in detail next.

FIG. 29 shows a system for reconstructing a picture signal by using arecording medium 810 in which the picture code streams output from theencoding apparatus of the present invention are stored. Code streamscontaining the picture code streams encoded by the picture encodingapparatus of the present invention are stored in the recording medium810. A decoder apparatus 820 reconstructs a picture signal from a codestream stored in the recording medium 810. A picture information outputapparatus 830 outputs a reconstructed picture. When, for example,picture information recorded on a recording medium from whichinformation can be read out by a computer is to be reconstructed by apersonal computer or the like, the bit stream of the picture informationis read out from the recording medium, and the bit stream can beprocessed by software by using a picture reconstruction program. In thiscase, for example, the picture information output apparatus 830 is adisplay or the like. The reconstructed picture signal may be recorded ona storage medium (not shown) or transmitted to another apparatus orsystem through a transmission path (not shown).

In this system having the above arrangement, a code stream having aformat like that in each of the embodiments described above is stored inthe recording medium 810. This code stream is characterized in that partof VOP (also a picture or frame) header information is recorded asduplex information on part of a video packet (or a slice, a GOB, or thelike) header. The decoder apparatus 820 reconstructs a picture signalfrom the code stream stored in the recording medium 810. That is, thedecoder apparatus 820 reads the code stream through a signal line 801,and generates a reconstructed picture by the procedure shown in FIG. 30.

The contents of processing in the decoder apparatus 820 will bedescribed below with reference to FIG. 30.

The decoder apparatus 820 sequentially reads out picture code streamsfrom the recording medium 810, and detects a sync code first (step S11).If the detected sync code is a VOP start code (YES in step S12), theimmediately preceding decoded VOP (frame) is output to the pictureinformation output apparatus 830 (step S13). The decoder apparatus 820decodes the VOP header (“VOP header” in FIG. 29) following the VOP startcode in the picture code (step S14). If the VOP header is properlydecoded (YES in step S15), the information recorded on the buffer memoryin the decoder apparatus 820 is replaced with the decoded VOP headerinformation (time information, VOP prediction mode information, and thelike) (step S16). The decoder apparatus 820 then decodes the macroblockdata (“MB data” in FIG. 29) following the VOP header, and decodes thevideo packet (step S17).

If the detected sync signal is a resync marker (YES in step S18), thedecoder apparatus 820 decodes the video packet header (macroblock number(MBA), the video packet quantization parameter (SQ), and the headerexpansion code (HEC)) following the resync marker (RM) (step S19). Ifthe header expansion code HEC in the video packet header is “0” (NO instep S20), the decoder apparatus 820 decodes the video packet (stepS17). If the header expansion code HEC is “1” (YES in step S20), thedecoder apparatus 820 decodes the subsequent duplexed information(“DUPH” in FIG. 29) (step S21). If the duplexed information can beproperly decoded (YES in step S22), the duplexed information is comparedwith the information held in the buffer memory (step S23). If theycoincide with each other (NO in step S23), the decoder apparatus 820decodes the macroblock data (“MB data” in FIG. 29) following the videopacket header, and decodes the video packet (step S17). If they do notcoincide with each other (YES in step S23), the decoder apparatus 820determines that this video packet belongs to a VOP different from theimmediately preceding decoded VOP, and outputs the immediately precedingdecoded VOP to the picture information output apparatus 830 (step S24).The decoder apparatus 820 then replaces the information recorded on thebuffer memory with the decoded duplexed information (step S25), anddecodes the video packet (step S17).

The above series of operations starting from sync code detection in FIG.30 is repeated while the picture code streams recorded on the recordingmedium 810 are sequentially read out, thereby reconstructing the videosignal.

Note that code streams obtained by multiplexing code streams obtained byencoding speech and audio signals, data, control information, and thelike may be recorded on the recording medium instead of recordingpicture code streams on the recording medium without any modification.In this case, before the information recorded on the recording medium isdecoded by the decoder apparatus 820, the picture code streams, thespeech/audio code streams, the data, and the control information aredemultiplexed by a demultiplexer, and the demultiplexed picture codestreams are decoded by the decoder apparatus 820.

In the case shown in FIG. 29, the information recorded on the recordingmedium 810 is transmitted to the decoder apparatus 820 through thesignal line 801. However, the information may be transmitted through atransmission path, other than the signal path, e.g., awire/radio/infrared transmission path.

As described above, according to the present invention, since importantinformation in each code stream recorded on the recording medium isduplexed and recorded, even if an error occurs in the informationrecorded on the recording medium, or an error occurs in a signal line ora transmission path through which the information recorded on therecording medium is sent to a reconstructing apparatus, a picture withlittle deterioration can be reconstructed.

The fourth embodiment of the present invention will be described next.

The overall arrangements of a video/speech encoding apparatus and avideo/speech decoding apparatus according to this embodiment are thesame as those shown in FIGS. 19 and 20. However, the operations of therespective sections are different from those in the third embodiment.This different point will be mainly described below.

FIGS. 34A to 34C show three examples of a video code stream 121A. Avideo encoder 111A performs encoding in units of VOPs (also pictures,frames, and fields) to generate the video code stream 121A. The pictureis further segmented into small regions referred to as macroblocks to beencoded.

A video code stream of one VOP starts from a VOP start code (“VSC” inFIGS. 34A to 34C) (also a picture start code) which is a sync code thatcan be uniquely decoded. A VOP header (“VH” in FIGS. 34A to 34C) (also apicture header) follows the VOP start code. The VOP header containsinformation indicating the time of the VOP, VOP encoding modeinformation, VOP quantization step size information, and the like.Encoded data of each macroblock follows the VOP header.

FIG. 34A shows a case in which the VOP is segmented into encoding unitsreferred to as video packets (also slices and GOBS) to be encoded. Eachvideo packet is constituted by one or a plurality of macroblocks (“MBdata” in FIG. 34A). When video encoding is to be performed by usingprediction over a plurality of macroblocks, like prediction of themotion vector of the macroblock of interest from the motion vectors ofadjacent macroblocks, prediction may be performed from only macroblockscontained in the same video packet to prevent any transmission patherror from affecting other video packets.

A code stream of each video packet other than the first video packet ofa VOP starts from a resync marker (RM) (also a slice start code and aGOB start code), which is a sync code that can be uniquely decoded, anda video packet header (VPH) (also a slice header and a GOB header). Data(MB data) of each macroblock follows these codes. The video packetheader contains a macroblock number (or a slice number or a GOB number)indicating the position of the first macroblock in the video packet, thequantization step size information of the video packet, and the like.This header may also contain important information such as VOP headerinformation as in the second embodiment.

FIG. 34B shows an example of the code stream obtained by encoding avideo code stream upon segmenting it into two pieces of information,i.e., information about the prediction mode and the motion vector andinformation about a residual error signal in motion compensationadaptive prediction or an orthogonal transform (DCT or the like)coefficient obtained by calculating the orthogonal transform of theresidual error signal. In a code stream of each video packet,information (“Motion” in FIG. 34B) about the prediction mode and motionvector is set near the reader side (immediately after the video packetheader or the VOP header in FIG. 34B), and information (“Texture” inFIG. 34B) about the prediction residual error DCT coefficient is setnear the tail side. The two types of information are separated from eachother by a motion marker (“MM” in FIG. 34B).

FIG. 34C shows an example of the code stream obtained by a videoencoding scheme of encoding a picture together with information aboutthe shape of the picture to be encoded. Referring to FIG. 34C, “Shape”is shape information, which is set before information (Motion) about theprediction mode and motion vector in each video packet (in the caseshown in FIG. 34C, this shape information is set immediately after thevideo packet header or the VOP header). The shape information (Shape)and the information (Motion) about the prediction mode and motion vectorare separated from each other by a shape marker (“SM” in FIG. 34C).

In the video code streams shown in FIGS. 34A to 34C, sync codes such asstart codes and resync markers are preferably set at bit positionscorresponding to integer multiples of a given number of bits. In thecodes shown in FIGS. 35A and 35B, the VOP start codes (VSCs) and theresync markers (RMs) at the heads of the respective video packets areset at the positions corresponding to integer multiples of N bits. Withthis processing, the number of positions at which sync codes aredetected by the decoding apparatus can be reduced 1/N that in theencoding scheme in which sync codes are arranged at arbitrary positions.With this processing, synchronization detection in the decodingapparatus can be simplified. In addition, the probability of aphenomenon called pseudo-synchronization, in which a bit pattern(pseudo-sync code) identical to a sync code is generated owing to atransmission path error, and is erroneously detected as a sync code, canbe reduced to 1/N. The quality of the decoded picture improves even inthe event of a transmission path error.

To set sync codes at predetermined positions in this manner, stuffingbits (“Stuffing bits” in FIG. 35A) are inserted between each sync codeand the information immediately before each sync code. FIG. 35B shows anexample of the code table of stuffing bits with N=8. These stuffing bitsare characterized in that they can be uniquely decoded in the reversedirection of the code stream, and the lengths of stuffing bits can bespecified in the decoding apparatus, unlike stuffing bits or the likeconstituted by only bits “0” which have been widely used in the priorarts. In the case shown in FIG. 35B, the first bit of stuffing bits is“0”, but the remaining bits are “1”. For this reason, the last bit ofstuffing bits, i.e., the first bit “0” that appears first when the bitsimmediately before a sync code are sequentially read in the reversedirection, can be determined as the first bit of the stuffing bits.

Since the position of the first bit of stuffing bits can be specified inthis manner, the introduction of a transmission path error into a codestream can be easily detected in the decoding apparatus. When a codestream is properly decoded, the decoding end position of the dataimmediately before stuffing bits should coincide with the start positionof the stuffing bits. If the decoding end position does not coincidewith the start position of the stuffing bits, it may be determined thata transmission path error has been introduced into the code stream, andthe code stream may not be decoded.

When a code stream is to be decoded in the reverse direction by using avariable-length code which can be decoded in the reverse direction, thestart position of reverse decoding must be specified in the decodingapparatus. The decoding start position of stuffing bits corresponds tothe bit immediately before the stuffing bits. In the prior arts, forexample, the length of stuffing bits constituted by only bits having thesame bit value cannot be specified, and hence the start position ofreverse decoding cannot be detected in the decoding apparatus. Incontrast to this, the stuffing bits in FIGS. 35A and 35B allow theposition of the first bit to be specified, and hence the start positionof reverse decoding can be specified.

Consider a code word containing many “0”s like a sync code“00000000000000001”. With stuffing bits constituted by only “0”s as inthe prior art, the probability of generating a bit pattern identical tothe sync code upon introduction of an error is high, and hencepseudo-synchronization tends to occur. In contrast to this, with thestuffing bits shown in FIGS. 35A and 35B, the probability ofpseudo-synchronization is low because all the bits of the stuffing bitsare “1” except for the first bit, and the Hamming distance from the synccode is large.

As described above, stuffing bits are generated in accordance with apredetermined rule. In the decoding/demultiplexing apparatus, therefore,the stuffing bits in a multiplexing code stream are collated with therule, and occurrence of an error in the multiplexing code stream can bedetermined, if it is determined that the stuffing bits are discordantwith the rule. With this operation, the decoding/demultiplexingapparatus can perform processing to prevent a considerable deteriorationin a demultiplexed/decoded signal to improve the quality of the decodedsignal even when an error is introduced into the multiplexing codestream.

In addition to VOP start codes and resync markers, motion markers (MM)and shape markers (SM) may be set at bit positions corresponding tointeger multiples of a given number of bits, and stuffing bits likethose in FIG. 35B may be set before these markers. With this setting,error detection and reverse encoding can be performed with respect toshape information, prediction mode information, motion vectorinformation, and the like.

FIG. 36 shows an example of the arrangement of a multiplexer 130A. Inthe example shown in FIG. 36, multiplex processing is performed on twolayers called an adaptation layer 1031A and a multiplex layer 1632A. Avideo code stream 121A, a speech code stream 122A, and a data codestream 103A are input to the adaptation layer 1031A. Outputs 1041A,1042A, and 1043A having undergone the processing on the adaptation layer1031A are input to the multiplex layer 1032A. A multiplexing code stream135A is output from the multiplex layer 1032A.

FIG. 37 shows an example of the output code stream 1041A obtained byprocessing the video code stream 121A on the adaptation layer 1031A. Theprocessing on the adaptation layer 1031A is performed in units ofAL-SDUs (also access units) obtained by breaking up the video codestream 121A into certain units. The output obtained by processing oneAL-SDU on the adaptation layer is called an AL-PDU. FIG. 37 shows theformat of one AL-PDU. An AL header is added to each AL-PDU. The ALheader may contain information indicating the number and attributes ofthe AL-PDU, the video encoding/multiplexing mode, and the like. AnAL-SDU as an AL payload follows the AL header. A check bit, e.g., a CRCcheck bit, for detecting whether a transmission path error is introducedinto the AL-PDU may be set behind the AL-SDU.

On the adaptation layer 1031A, the video code stream 121A and the datacode stream 103A are processed in the same manner as described above tooutput the AL-PDUs 1042A and 1043A corresponding to the speech codestream and the data code stream. Note, however, that the information setin each AL header, the length and presence/absence of a CRC check bit,and the like may differ from those in the AL-PDU 1041A corresponding tothe video code stream.

The AL-PDUs 1041A, 1042A, and 1043A generated on the adaptation layer1031A are multiplexed on the multiplex layer 1032A. Multiplexing isperformed in units of MUX-PDUs. FIGS. 38A to 38C show examples of theMUX-PDU obtained by multiplexing. A multiplexed sync code (MUX flag) anda multiplexed header (MUX header) are added to the MUX-PDU. Themultiplexed header may contain information indicating the types ofoutputs from the adaptation layer, which are multiplexed with theMUX-PDU, the manner of multiplexing them, the length of the MUX-PDU, andthe like.

FIG. 38A shows a case in which one AL-PDU is set in one MUX-PDU.

FIG. 38B shows a case in which one AL-PDU is divided into a plurality of(two in this case) MUX-PDUs. In this case, each multiplexed header maycontain information indicating the ordinal number of the divided AL-PDUportion, contained in the MUX-PDU, in the overall AL-PDU, or indicatingwhether the divided AL-PDU portion is the first or last portion of oneAL-PDU.

FIG. 38C shows a case in which a plurality of AL-PDUs are set in oneMUX-PDU. In the case shown in FIG. 38C, an AL-PDU (Video AL-PDU)corresponding to a video code stream and an AL-PDU (Audio AL-PDU)corresponding to a speech code stream are multiplexed. In this case, themultiplexed header may contain information indicating the boundarybetween the plurality of AL-PDUs contained in the MUX-PDU.Alternatively, an identifier indicating a boundary may be set at theboundary between the AL-PDUs.

As described above, on the adaptation layer, a code stream is processedin units of AL-SDUs or access units. FIGS. 39A to 39C show examples ofhow a video code stream is segmented on the adaptation layer.

FIGS. 39A to 39C each show a case in which one VOP is set as one accessunit. FIGS. 39A to 39C respectively correspond to the video code streamsin FIGS. 34A to 34C.

FIGS. 40A to 40C each show a case in which one video packet is set asone access unit. FIGS. 40A to 40C respectively correspond to the videocode streams in FIGS. 34A to 34C.

When a video packet is to be encoded upon being segmented into shapeinformation, motion vector information, and DCT coefficient information,as shown in FIGS. 34B and 34C, an access unit may also be segmentedaccordingly. FIGS. 41A and 41B respectively correspond to the video codestreams in 34B and 34C. Motion markers (MM) and shape markers (SM)indicating boundaries are set between shape information (Shape),information (Motion) about the prediction mode and motion vector, andinformation (Texture) about a residual error signal and a DCTcoefficient to generate access units.

When multiplexed sync codes, AL boundary identifiers, and the like,which indicate the boundaries between MUX-PDUs or AL-PDUs are added to acode stream on the multiplex layer, as described above, the startpositions of the respective access units can be discriminated from thesecodes and identifiers. In this case, the sync codes at the heads of theaccess units may be removed from the video code stream. FIGS. 42A to 42Ceach show a case in which one VOP is set as one access unit. In thiscase, the VOP start code at the head of the VOP may be removed. FIGS.43A to 43C each show a case in which one video packet is set as oneaccess unit. In this case, the VOP start code and the resync marker atthe head of each video packet may be removed. FIGS. 44A and 44B eachshow a case in which shape information (Shape), information (Motion)about the prediction mode and motion vector, and information (Texture)about a residual error signal and a DCT coefficient each form an accessunit. In this case, the VOP start code and the resync marker at the headof each video packet and motion makers (MM) and shape markers (SM)indicating the boundaries between “Shape”, “Motion”, and “Texture” maybe removed.

As shown in FIGS. 45A and 45B, one or a plurality of video packets maybe set in one access unit. In this case, as shown in FIG. 45B, only theVOP start code or the resync maker at the head of each access unit maybe removed. Similarly, in the video code streams shown in FIGS. 34B and34C, each access unit may be constituted by a plurality of videopackets.

When a video packet is to be encoded upon being segmented into “Shape”,“Motion”, and “Texture”, as shown in FIGS. 34B and 34C, each access unitmay be constituted by a set of Shape data, Motion data, or Texture dataof a plurality of video packets. FIGS. 46A to 46D each show a case inwhich such processing is performed with respect to the code stream inFIG. 34B, and each access unit is constituted by a set of Motion data orTexture data. A VOP header and a video packet header are set before“Motion” in each video packet.

Access units may be constituted by sets of “Motion” and “Texture” inunits of VOPs or an arbitrary number of video packets.

In such an access unit format, a sync code may be set at the boundarybetween “Motion” and “Texture” of video packets. FIG. 46B shows a casein which sync codes (RM) are set at the boundaries between the Motiondata. FIGS. 46C and 46D each show a case in which sync codes (RM) areset at the boundaries between the Motion data and between the Texturedata. FIG. 46D shows a case in which a sync code (VSC) is set at thehead of each access unit. Different sync codes may be used for “Motion”and “Texture”. For example, a motion marker may be used for “Motion”,and a resync marker for “Texture”.

In the video code stream shown in FIG. 34C as well, each access unit maybe constituted by a set of Shape data, Motion data, or Texture data.

As described above, each access unit is formed by collecting codestreams, from code streams having different degrees of importance, e.g.,“Shape”, “Motion”, and “Texture”, which have the same degree ofimportance, and error protection of different degrees (e.g., using errorcorrection and detection codes and performing retransmission) isprovided for each access unit. With this operation, error protection canbe performed in accordance with the degrees of importance of therespective code streams, improving the quality of the decoded picture inthe event of a transmission path error. In general, when a transmissionerror is introduced into shape information (Shape) or mode informationor motion vector information (Motion), the quality of the decodedpicture greatly suffers. To prevent this, error correction codes suitedfor shape and Motion may be used to provide strong error protection. Incontrast to this, even if a transmission path error is introduced into aresidual error signal (Texture), the picture quality doest notdeteriorate much. Error protection to be provided need not be verystrong, and hence the redundancy due to error correction codes, errordetection codes, and the like can be reduced.

In the above case in which sync codes are removed from video codestreams, the multiplexer 130A may remove the sync codes contained in thevideo code stream 121A, or the video code stream 121A from which thesync codes are removed by the video encoder 111A in advance may besupplied to the multiplexer.

In any of the cases shown in FIGS. 39A to 46D, the length of each accessunit may be set to an integer multiple of a predetermined length (e.g.,in bytes). As in the case shown in FIGS. 35A and 35B, when a video codestream is segmented into video packets or VOPs in units of N bits (e.g.,bytes) with stuffing bits being set before each resync marker or eachstart code, if each access unit contains these stuffing bits, the lengthof each access unit can be set to an integer multiple of a predeterminedlength (e.g., in bytes).

If such processing is not performed for a video code stream, stuffingbits may be added to the end of each access unit to set the length ofeach access unit to an integer multiple of a predetermined length (e.g.,in bytes). As the stuffing bits, those shown in FIG. 35B may be used. Inthis case, an error introduced into the code stream can be detected byusing the stuffing bits as in the case in which the stuffing bits areinserted in a video code stream. In addition, stuffing bits may be addedto speech and data code streams, in addition to a video code stream, toset the length of each access unit to an integer multiple of apredetermined length (e.g., in bytes).

On the multiplex layer, when the multiplexed payload contains the samebit pattern as that of the multiplexed sync signal, the demultiplexererroneously determines that this pattern is a multiplexed sync code. Asa result, the boundary between MUX-PDUs is erroneously detected. Thatis, pseudo-synchronization (also emulation) may occur. If the videoencoder generates a video code stream in which no bit pattern identicalto that of a sync code (e.g., a VOP start code or a resync marker) inthe video code stream is generated at a portion other than each synccode, it can be detected by using a video sync code whetherpseudo-synchronization has occurred on the multiplex layer.

The head position of an MUX-PDU is adjusted to the head position of anAL-PDU to form an MUX-PDU. FIGS. 38A to 38C each show such a format. Avideo sync code is added to the head of each AL-SDU (access unit). Withthis arrangement, a multiplexed sync code and a video sync code arearranged to be adjacent to each other through a multiplexed header or anAL header. If a multiplexed sync code is erroneously detected by thedemultiplexing apparatus, the apparatus proceeds to the detection of amultiplexed header, an AL header, and a video sync code adjacent to thedetected code. However, since the detected code is a pseudo-sync code,if the detected pieces of information are decoded as a multiplexedheader, an AL header, and a video sync code, wrong pieces of informationare obtained. For this reason, the demultiplexer checks whether thedecoded multiplexed header, AL header, and video sync code are correctpieces of information. If it is determined that they are not correct,the detected multiplexed sync code is determined as a pseudo-sync code.

FIG. 48 shows the second example of the arrangement of the multiplexer.In this example, the multiplexer is divided into two layers, i.e., aFlexMux layer and a TransMux layer. The FlexMux layer is divided into anadaptation sub-layer (AL) and a Mux sub-layer. The TransMux layer isdivided into a Protection sub-layer and a TransMux sub-layer.

FIG. 49 shows a code stream generated on the FlexMux layer. Referencenumerals 1061A and 1062A respectively denote code streams generated onthe adaptation sub-layer and the Mux sub-layer. An AL header (Header)1065A containing information indicating the type of information to bemultiplexed, information indicating the time, and the like is input tothe adaptation sub-layer. In addition, a payload 1066A (Payload)containing video, speech, and data code streams to be multiplexed ismultiplexed to generate an AL-PDU. On the Mux sub-layer, an index 1068Aindicating the type and channel number of the AL-PDU and information(length) 1069A indicating the length of the AL-PDU are added to generatea FlexMux-PDU.

The FlexMux-PDU generated on the FlexMux layer is input to the TransMuxlayer. The TransMux layer may use the arrangement of the multiplexer inFIG. 36. In this case, a protection sub-layer corresponds to theadaptation layer 1031A in FIG. 36, and a transmax sub-layer correspondsto the multiplex layer 1032A in FIG. 36. Alternatively, the arrangementshown in FIG. 36 may be used for the transmax sub-layer, and theprotection sub-layer may not be used.

Note that the arrangement for multiplexing unit code streams each havinga length set to an integer multiple of a predetermined length bystuffing bits, and the arrangement for collecting sync words having thesame degree of importance to form an access unit can be applied to thestructures of the multiplexing code streams in the first to thirdembodiments.

When a plurality of video packets are set in one access unit as in thecase shown in FIGS. 45A and 45B, the boundaries between access units andresync markers may be arranged in a frame in the manner shown in FIG.50. Referring to FIG. 50, each hollow bullet indicates a macroblock witha resync marker (i.e., the first macroblock of each video packet), andeach full gray bullet indicates the position of the first macroblock ineach access unit. In such a picture, since the human figure isinformation more important than the background information, the humanfigure information preferably has high robustness against transmissionpath errors. For this reason, many resync markers are arranged on thehuman figure portion to arrange video packets at short intervals so asto improve the error robustness, thus allowing quick recovery from atransmission path error. In contrast to this, since the degree ofimportant of the background portion is not very high, a smaller numberof resync markers may be arranged in the background portion to increasethe intervals between the video packets therein.

In an encoding scheme of encoding a frame from the upper left macroblockto the lower right macroblock in the raster scan order, an errorintroduced into a given macroblock may propagate to the lower rightmacroblock. When the error propagates to an important region, inparticular, the picture quality greatly deteriorates. For this reason, amacroblock from which an important region starts may be set as the firstmacroblock in an access unit to prevent an error introduced into anothermacroblock from affecting the important region. In the case shown inFIG. 50, the macroblock at the left end of the human figure as animportant region is the first macroblock of an access unit.

If the strength of error protection can be changed in one access unit,the strength may be changed in accordance with the degrees of importanceof regions in a frame. Referring to FIG. 51, the light gray (hatching)region indicates an region (High QoS) for which strong error protectionis provided, which is assigned to the human figure portion as importantinformation. FIGS. 52A to 52C each show an example of the format of anaccess unit corresponding to such a picture. Referring to FIGS. 52A to52C, the light gray (hatching) portions correspond to the light graymacroblocks in FIG. 51, for which strong error protection is provided.

When a video packet is to be encoded upon being divided into “Motion”and “Texture”, “Motion” is set in the first half portion of an accessunit, and “Texture” is set in the second half portion, as shown in FIGS.52A to 52C. In addition, the important regions indicated by the lightgray in FIG. 51 may be respectively set in the first half portions ofthe first and second half portions. Alternatively, “Motion” and“Texture” may be set in different access units, and stronger errorprotection may be provided for the first half portions of the respectiveaccess units. With this arrangement, stronger error protection can beprovided for the “Motion” portion, of the code stream of the importantregion, which is more important than the remaining portions.

As described above, according to the present invention, by arrangingresync markers and using the format of an access unit, higher errorrobustness can be realized with a smaller overhead (redundancy). Ingeneral, when resync markers are used and strong error protection isprovided, the overhead increases. If, however, many resync markers areassigned to a human figure or the like as important information tofortify error protection provided therefor, and fewer resync markers areassigned to a less important region such as a background portion toweaken error protection, higher error robustness can be provided for theimportant information, as compared with the case in which resync markersare uniformly assigned to the overall picture, and error protection isuniformly provided therefor, with the same average overhead.

When many resync markers are assigned to a portion like the human figureportion in FIG. 51, the length of each video packet decreases very muchaccordingly. If, therefore, each video packet is assigned to one accessunit, the overhead based on an AL header, a multiplexed header, amultiplexed sync code, and the like increases very much. In this case,as shown in FIGS. 45A and 45B, a plurality of video packets arepreferably set in one access unit to reduce the overhead.

FIG. 53 shows the circuit arrangement of the encoder 103 of the encodingapparatus shown in FIG. 1. According to this arrangement, the pictureinformation input to the encoder 103 is sent to a motion compensationcircuit 1036 first. In this case, the motion compensation circuit 1036performs motion compensation between the input picture information andthe previous frame information stored in a frame memory 1035. Asubtracter 1030 calculates the difference between the previous frameinformation and the current frame information after the motioncompensation. Only the difference information is DCT-transformed in adiscrete cosine transform circuit (DCT) 1031, and is quantized by aquantizer 1032. The resultant information is sent to a variable-lengthencoder 1038.

The output from the quantizer 1032 is dequantized by a dequantizer (IQ)1033. The resultant data is IDCT-transformed in an inverse discretecosine transform circuit (IDCT) 1034. The output from the inversediscrete cosine transform circuit 1034 and the motion compensationinformation from the motion compensation circuit 1036 are added togetherby an adder 1037. The output from the adder 1037 becomes decoded pictureinformation of the current frame, i.e., local decoded pictureinformation. This local decoded image information is stored in the framememory 1035 to be used as data for motion compensation in encoding thenext frame.

The quantized information sent to the variable-length encoder 1038 issubjected to variable-length encoding. The resultant information is sentto an important information designation circuit 1039. This importantinformation designation circuit 1039 extracts only the externallydesignated important information portion from the variable-lengthencoded information, and sends it to the important header informationreconstruction circuit 104. Note that all the information is sent to thebit string reconstruction circuit 107 regardless of whether theimportant information designation circuit 1039 designates importantinformation.

FIG. 54 shows the circuit arrangement of the decoder 124 of the decodingapparatus shown in FIG. 2. According to this arrangement, the pictureinformation sent from a demultiplexer 121 is temporarily stored in areception buffer 1241. Thereafter, the subsequent header information issent to a header decoder 1242 in response to decoding start positioninformation from a synchronization detector 122. The header informationis decoded by the decoder 1242. At this time, the header information onthe uppermost layer is decoded first, and the decoded information issent to an error check circuit 125, which checks the presence/absence ofan error in the information. The pieces of header information on thesubsequent layers are decoded in accordance with a designation from adesignation information determination circuit 123. That is, when thepresence of important header information is designated, the informationat a predetermined position is decoded as the important headerinformation. This important information is transferred to the importantinformation circuit 126 to be temporarily stored therein. When animportant information circuit 126 detects the introduction of an errorin the header information on the uppermost layer, since the importantheader information from the important information circuit 126 is sentback to the decoder 1242, the decoder 1242 continues the subsequentdecoding processing by using the important header information from theimportant information circuit 126.

The information (actual picture information) following the headerinformation is dequantized by a dequantizer 1243. The resultantinformation is sent to an IDCT circuit 1244. The IDCT circuit 1244calculates the inverse discrete cosine transform of the dequantizedinformation, and decodes the difference signal between the current andprevious frames. An adder 1245 adds this decoded difference signal tothe previous frame information (the previous frame information aftermotion compensation using motion vector information) stored in a framememory 1246. This addition result signal becomes reconstructed pictureinformation of the current frame. This information is sent to a D/Acircuit 127 and is also stored in the frame memory 1246.

The arrangements of the encoding/decoding apparatuses and the streamstructures of the embodiments described above can be combined with eachother, as needed. In addition, the operations of the respectiveencoding/decoding apparatuses can be replaced with procedures based onsoftware control. The corresponding software programs and encodedstreams can be provided as a storage medium.

INDUSTRIAL APPLICABILITY

As has been described above, according to the present invention, sinceerror robustness is provided for the structure of a code stream itself,even if an error is introduced into important information such as headerinformation, and the information cannot be used for decoding processing,the decoding processing can be properly continued by using newinformation designated by designation information as a substitute. Inaddition, since strong error protection is provided for importantinformation such as a picture header and a slice header in a video codestream by using error correction and detection codes, a high-qualityvideo signal can be decoded even in the event of a transmission patherror as compared with the conventional video encoding apparatus and theconventional multiplexing apparatus which do not provide sufficienterror protection for important information. Furthermore, since amultiplexed unit code stream having a length corresponding to an integermultiple of a predetermined length is generated by adding stuffing bits,the introduction of an error can be easily detected. Moreover, since anaccess unit is formed by collecting code words having the same degree ofimportance, error protection can be performed in accordance with thedegrees of importance of the code words. As a result, the quality of thedecoded picture improves in the event of a transmission-path error.

1. An encoding apparatus comprising: means for adding a sync signal toheader information required for encoding, and encoding the information;means for transmitting, as reconstruction information for reconstructingthe encoded information, information which has already been transmittedor part of the information or information indicating contents of theinformation or contents of part of the information, upon adding theinformation to the encoded information, the encoded informationcontaining a picture code stream obtained by compress-encoding a picturesignal and the reconstruction information containing informationindicating a prediction mode of each picture frame of the picture codestream; and means for inserting designation information with apredetermined bit pattern which indicates addition of the reconstructioninformation in the header information.
 2. The apparatus according toclaim 1, wherein information for changing encoding processing of aportion associated with the header information from encoding processingbefore the portion associated with the header information to anothertype of encoding processing is inserted in the header information, andthe information is transmitted.
 3. The apparatus according to claim 2,wherein the reconstruction information includes information for changingthe encoding processing or information for reconstructing part of theencoding processing.
 4. An encoding apparatus comprising: an adder toadd a sync signal to header information required for encoding, andencoding the information; a transmitter to transmit, as reconstructioninformation for reconstructing the encoded information, informationwhich has already been transmitted or part of the information orinformation indicating contents of the information or contents of partof the information, upon adding the information to the encodedinformation, the encoded information containing a picture code streamobtained by compress-encoding a picture signal and the reconstructioninformation containing information indicating a prediction mode of eachpicture frame of the picture code stream; and an insertion unitconfigured to insert designation information with a predetermined bitpattern which indicates addition of the reconstruction information inthe header information.
 5. The apparatus according to claim 4, whereininformation for changing encoding processing of a portion associatedwith the header information from encoding processing before the portionassociated with the header information to another type of encodingprocessing is inserted in the header information, and the information istransmitted.
 6. The apparatus according to claim 5, wherein thereconstruction information includes information for changing theencoding processing or information for reconstructing part of theencoding processing.
 7. An encoding method comprising: adding a syncsignal to header information required for encoding; encoding theinformation; transmitting, as reconstruction information forreconstructing the encoded information, information which has alreadybeen transmitted or part of the information or information indicatingcontents of the information or contents of part of the information, uponadding the information to the encoded information, the encodedinformation containing a picture code stream obtained bycompress-encoding a picture signal and the reconstruction informationcontaining information indicating a prediction mode of each pictureframe of the picture code stream; and inserting designation informationwith a predetermined bit pattern which indicates addition of thereconstruction information in the header information.
 8. The encodingmethod according to claim 7, further including inserting, in the headerinformation, information for changing encoding processing of a portionassociated with the header information from encoding processing beforethe portion associated with the header information to another type ofencoding processing, and transmitting the information.
 9. The encodingmethod according to claim 8, wherein the reconstruction informationincludes information for changing the encoding processing or informationfor reconstructing part of the encoding processing.